Commit 06939346 authored by Adrien Pavie's avatar Adrien Pavie

Icons for several types of advertising=* elements

parent 23b9acae
......@@ -43,8 +43,8 @@ html:
cp $(SRC_FOLDER)/*.html $(DIST_FOLDER)/
images:
cp -r $(IMG_FOLDER) $(DIST_FOLDER)/
rm -f $(DIST_FOLDER)/img/*.svg
mkdir -p $(DIST_FOLDER)/img
./svgtopng.sh $(IMG_FOLDER) $(DIST_FOLDER)/img
nm_assets:
cp $(NM_FOLDER)/leaflet/dist/images/* $(DIST_FOLDER)/img/
......
......@@ -4,7 +4,7 @@ OpenAdvertMap
Read-me
-------
OpenAdvertMap is an interactive map showing advertisement-related data from [OpenStreetMap](http://openstreetmap.org). OpenAdvertMap is written in JavaScript (ES6).
OpenAdvertMap is an interactive map showing [advertisement-related data](http://wiki.openstreetmap.org/wiki/Key:advertising) from [OpenStreetMap](http://openstreetmap.org). OpenAdvertMap is written in JavaScript (ES6).
A live demo is available at: http://projets.pavie.info/openadvertmap/
......@@ -15,6 +15,7 @@ Build
### Dependencies
* npm
* sed
* inkscape
### Compiling
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32.000001" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1032" cx="15.58" gradientTransform="matrix(1.1868 0 0 .73720 -2.4908 269.6)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<g fill-rule="evenodd" transform="translate(0 -1020.4)">
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="19.048" width="31.048" stroke="#7e7e7e" y="1020.8" x=".47618" stroke-width=".95235" fill="url(#a)"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="12" width="6" y="1040.4" x="13" fill="#a2a2a2"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="25" width="50" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 50 25.000001">
<defs>
<filter id="a" style="color-interpolation-filters:sRGB">
<feFlood result="flood" flood-opacity=".58824" flood-color="rgb(74,74,74)"/>
<feComposite operator="in" result="composite1" in2="SourceGraphic" in="flood"/>
<feGaussianBlur stdDeviation="2" result="blur" in="composite1"/>
<feOffset result="offset" dx="0" dy="0"/>
<feComposite operator="atop" result="composite2" in2="offset" in="offset"/>
</filter>
</defs>
<g transform="translate(-1.9607 -1029.3)">
<path style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" d="m17.143 1032.6-10.893 12.3h13l-6.25 7.4129h6l6.25-7.4129h13l10.893-12.355z" fill-rule="evenodd" transform="matrix(.96696 0 0 1.0589 .17935 -62.09)" filter="url(#a)" fill="#a2a2a2"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32.000001" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1032" cx="15.58" gradientTransform="matrix(.88920 0 0 .59069 2.1459 424.79)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<g fill-rule="evenodd" transform="translate(0 -1020.4)">
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="15.262" width="23.262" stroke="#7e7e7e" y="1026.7" x="4.3689" stroke-width=".73790" fill="url(#a)"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="10" width="1" y="1042.4" x="8" fill="#a2a2a2"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="10" width="1" y="1042.4" x="23" fill="#a2a2a2"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="25" width="50" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 50 25.000001">
<defs>
<filter id="a" style="color-interpolation-filters:sRGB">
<feFlood result="flood" flood-opacity=".58824" flood-color="rgb(74,74,74)"/>
<feComposite operator="in" result="composite1" in2="SourceGraphic" in="flood"/>
<feGaussianBlur stdDeviation="2" result="blur" in="composite1"/>
<feOffset result="offset" dx="0" dy="0"/>
<feComposite operator="atop" result="composite2" in2="offset" in="offset"/>
</filter>
</defs>
<path style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m15.314 6.4924-7.383 10.381h4l-3.931 6.444h1l3.931-6.4447h14l-3.931 6.445h1l3.931-6.4447h4l7.3827-10.38z" fill-rule="evenodd" filter="url(#a)" fill="#7e7e7e"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 32 32.000001">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1032" cx="15.58" gradientTransform="matrix(.51926 0 0 .3208 8.5534 -324.71)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<path style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" d="m9.8516 2.1773s2.239-1.0227 3.9445-1.0227 4.6819 1.0227 6.2886 1.0227 3.3514-0.90474 3.3514-0.90474v8.2889s-1.6392 0.90474-3.4305 0.90474c-1.7912 0-5.6246-1.0227-7.3169-1.0227-1.692 0-2.837 1.0224-2.837 1.0224z" fill-rule="evenodd" stroke="#7e7e7e" stroke-width=".5" fill="url(#a)"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" fill-rule="evenodd" height="30" width="1" y="2" x="8.6078" fill="#a2a2a2"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="25" width="50" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 50 25.000001">
<defs>
<filter id="a" style="color-interpolation-filters:sRGB">
<feFlood result="flood" flood-opacity=".58824" flood-color="rgb(74,74,74)"/>
<feComposite operator="in" result="composite1" in2="SourceGraphic" in="flood"/>
<feGaussianBlur stdDeviation="2" result="blur" in="composite1"/>
<feOffset result="offset" dx="0" dy="0"/>
<feComposite operator="atop" result="composite2" in2="offset" in="offset"/>
</filter>
</defs>
<path style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" d="m26.739-2.5c-1.4392 1e-7 -3.176 0.56311-3.709 0.747v-0.00474h-1l-13.423 24.258h1l9.9714-17.614c0.41305-0.2361 1.3539-0.68383 2.6016-0.68383 1.6923 0 5.5252 0.82754 7.3164 0.82754 1.7913 0 3.4316-0.73121 3.4316-0.73121l3.4516-6.7025s-1.7449 0.73121-3.3516 0.73121c-1.6067-1e-7 -4.5836-0.82754-6.2891-0.82754z" fill-rule="evenodd" transform="matrix(.92283 0 0 .83245 .31204 4.1755)" filter="url(#a)"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32.000001" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1032" cx="15.58" gradientTransform="matrix(.58459 0 0 .82412 6.8919 185.91)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<g fill-rule="evenodd" transform="translate(0 -1020.4)">
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="21.293" width="15.293" stroke="#7e7e7e" y="1025.7" x="8.3534" stroke-width=".70670" fill="url(#a)"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="5" width="12" y="1047.4" x="10" fill="#a2a2a2"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="25" width="50" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 50 25.000001">
<defs>
<filter id="a" style="color-interpolation-filters:sRGB">
<feFlood result="flood" flood-opacity=".58824" flood-color="rgb(74,74,74)"/>
<feComposite operator="in" result="composite1" in2="SourceGraphic" in="flood"/>
<feGaussianBlur stdDeviation="2" result="blur" in="composite1"/>
<feOffset result="offset" dx="0" dy="0"/>
<feComposite operator="atop" result="composite2" in2="offset" in="offset"/>
</filter>
</defs>
<path fill-rule="evenodd" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m16.629 3.7957-7.1909 17.305h2l-1.438 3.899h12l1.4382-3.8992h2l7.191-17.305z" transform="matrix(.88718 0 0 .86173 .76180 1.6294)" filter="url(#a)" fill="#7e7e7e"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 32 32.000001">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1032" cx="15.58" gradientTransform="matrix(.89010 0 0 .55291 2.1318 -556.12)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" fill-rule="evenodd" height="14.286" width="23.286" stroke="#7e7e7e" y="7.288" x="4.3571" stroke-width=".71427" fill="url(#a)"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" fill-rule="evenodd" height="10" width="1" y="22" x="15.5" fill="#a2a2a2"/>
<g fill-rule="evenodd" fill="#930100">
<path style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m14.576 18.619v1h10.373v-1h-10.373z"/>
<path d="m26.103 19.119-1.73 1v-2l1.73 1z" stroke="#930100" stroke-width=".2pt"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="25" width="50" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 50 25.000001">
<defs>
<filter id="a" style="color-interpolation-filters:sRGB">
<feFlood flood-color="rgb(74,74,74)" result="flood" flood-opacity=".58824"/>
<feComposite operator="in" result="composite1" in2="SourceGraphic" in="flood"/>
<feGaussianBlur stdDeviation="2" result="blur" in="composite1"/>
<feOffset result="offset" dx="0" dy="0"/>
<feComposite operator="atop" result="composite2" in2="offset" in="offset"/>
</filter>
</defs>
<path style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none;text-decoration-style:solid" d="m15.314 6.4924-7.383 10.381h11.998l-3.931 6.444h1l3.931-6.4447 11.002 0.0003 7.3827-10.38z" fill-rule="evenodd" filter="url(#a)" fill="#7e7e7e"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 32 32.000001">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1032" cx="15.58" gradientTransform="matrix(.36003 0 0 .90638 10.391 -923.32)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" fill-rule="evenodd" height="23.418" width="9.4184" stroke="#7e7e7e" y=".29081" x="11.291" stroke-width=".58162" fill="url(#a)"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" fill-rule="evenodd" height="8" width="10" y="24" x="11" fill="#7e7e7e"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="25" width="50" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 50 25.000001">
<defs>
<filter id="a" style="color-interpolation-filters:sRGB">
<feFlood result="flood" flood-opacity=".58824" flood-color="rgb(74,74,74)"/>
<feComposite operator="in" result="composite1" in2="SourceGraphic" in="flood"/>
<feGaussianBlur stdDeviation="2" result="blur" in="composite1"/>
<feOffset result="offset" dx="0" dy="0"/>
<feComposite operator="atop" result="composite2" in2="offset" in="offset"/>
</filter>
</defs>
<path style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" d="m21.553-2.5h10l-10.553 25h-10z" fill-rule="evenodd" transform="matrix(1.0176 0 0 .81758 -.28124 4.3242)" filter="url(#a)" fill="#7e7e7e"/>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 32 32.000001">
<defs>
<radialGradient id="a" gradientUnits="userSpaceOnUse" cy="1065.7" cx="16.176" gradientTransform="matrix(1.1172,0,0,1.1411,-2.0367,-1199.9)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<g transform="matrix(.74999 0 0 .74999 4.0002 8.0003)">
<circle style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" stroke-width="1.4265" fill-rule="evenodd" stroke="#7e7e7e" cy="16" cx="16" r="15.287" fill="url(#a)"/>
<g fill="#510000" transform="matrix(.6835 0 0 .6835 3.5583 -3.2315)">
<path d="m15.402 38.145h3.9648v4.9609h-3.9648v-4.9609zm3.848-2.871h-3.7305v-3.0078q0-1.9727 0.54688-3.2422t2.3047-2.9492l1.7578-1.7383q1.1133-1.0352 1.6016-1.9531 0.50781-0.91797 0.50781-1.875 0-1.7383-1.2891-2.8125-1.2695-1.0742-3.3789-1.0742-1.543 0-3.3008 0.68359-1.7383 0.68359-3.6328 1.9922v-3.6719q1.8359-1.1133 3.7109-1.6602 1.8945-0.54688 3.9062-0.54688 3.5938 0 5.7617 1.8945 2.1875 1.8945 2.1875 5 0 1.4844-0.70312 2.832-0.70312 1.3281-2.4609 3.0078l-1.7188 1.6797q-0.91797 0.91797-1.3086 1.4453-0.37109 0.50781-0.52734 0.99609-0.11719 0.41016-0.17578 0.99609-0.059 0.586-0.059 1.602v2.4023z"/>
</g>
</g>
</svg>
......@@ -32,18 +32,115 @@ class Main {
this.map.attributionControl.setPrefix('<a href="http://pavie.info">&copy; Adrien Pavie 2016</a> | <a href="https://framagit.org/PanierAvide/OpenAdvertMap">About</a>');
let hash = new L.Hash(this.map);
var http = window.location && window.location.protocol == 'https:' ? 'https:' : 'http:';
let http = window.location && window.location.protocol == 'https:' ? 'https:' : 'http:';
L.tileLayer(http+'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
name: "OpenStreetMap",
attribution: "Tiles <a href=\"http://openstreetmap.org/\">OSM</a>",
maxZoom: 19
}).addTo(this.map);
//Available icons
let adIconSize = [32,32];
let adIconShadowSize = [50,25];
let adIconAnchor = [16,32];
let adIconShadowAnchor = [13,23];
let adIconPopupAnchor = [0,-16];
let adIcons = {
unknown: L.icon({
iconUrl: 'img/unknown.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
popupAnchor: adIconPopupAnchor
}),
billboard: L.icon({
iconUrl: 'img/billboard.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
shadowUrl: 'img/billboard_shadow.png',
shadowSize: adIconShadowSize,
shadowAnchor: adIconShadowAnchor,
popupAnchor: adIconPopupAnchor
}),
board: L.icon({
iconUrl: 'img/board.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
shadowUrl: 'img/board_shadow.png',
shadowSize: adIconShadowSize,
shadowAnchor: adIconShadowAnchor,
popupAnchor: adIconPopupAnchor
}),
flag: L.icon({
iconUrl: 'img/flag.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
shadowUrl: 'img/flag_shadow.png',
shadowSize: adIconShadowSize,
shadowAnchor: adIconShadowAnchor,
popupAnchor: adIconPopupAnchor
}),
poster_box: L.icon({
iconUrl: 'img/poster_box.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
shadowUrl: 'img/poster_box_shadow.png',
shadowSize: adIconShadowSize,
shadowAnchor: adIconShadowAnchor,
popupAnchor: adIconPopupAnchor
}),
sign: L.icon({
iconUrl: 'img/sign.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
shadowUrl: 'img/sign_shadow.png',
shadowSize: adIconShadowSize,
shadowAnchor: adIconShadowAnchor,
popupAnchor: adIconPopupAnchor
}),
totem: L.icon({
iconUrl: 'img/totem.png',
iconSize: adIconSize,
iconAnchor: adIconAnchor,
shadowUrl: 'img/totem_shadow.png',
shadowSize: adIconShadowSize,
shadowAnchor: adIconShadowAnchor,
popupAnchor: adIconPopupAnchor
})
};
/*
* Overpass layer
*/
this.mapData = new L.OverPassLayer({
'query': '(node({{bbox}})[advertising]);out qt;'
query: "(node({{bbox}})[advertising]);out qt;",
onSuccess: function(data) {
let adValsIgnored = [ "no" ];
for(let i = 0; i < data.elements.length; i++) {
//~ var pos, popupContent, popup, marker,
let e = data.elements[i];
if(this._ids[e.id] || !e.tags.advertising || adValsIgnored.indexOf(e.tags.advertising) >= 0) { continue; }
this._ids[e.id] = true;
let marker = L.marker(
(e.type === 'node') ? L.latLng(e.lat, e.lon) : L.latLng(e.center.lat, e.center.lon),
{
icon: (adIcons[e.tags.advertising]) ? adIcons[e.tags.advertising] : adIcons.unknown
}
);
let popupContent = this._getPoiPopupHTML(e.tags, e.id);
let popup = L.popup().setContent(popupContent);
marker.bindPopup(popup);
this._map.addLayer(marker);
}
},
minZoomIndicatorOptions: {
minZoomMessage: "Zoom in to see data"
}
}).addTo(this.map);
}
}
......
#!/bin/bash
for i in `ls $1/*.svg`; do
n=$(basename $i)
inkscape -e $2/${n%.svg}.png $i
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment