Commit 9483d76f authored by Adrien Pavie's avatar Adrien Pavie

Rendering ads in bus shelters (closes #1)

parent d8596fde
<?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(.35681 0 0 .60942 1.1898 -610.8)" r="13.515">
<stop stop-color="#ff0018" offset="0"/>
<stop stop-color="#fff600" offset="1"/>
</radialGradient>
</defs>
<g fill="#7e7e7e" fill-rule="evenodd">
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="5.7985" width="1.0882" y="26.201" x="1.5819"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="5.7985" width="1.0882" y="26.201" x="29.3"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="5.7985" width="1.0882" y="26.201" x="10.821"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="5.7985" width="1.0882" y="26.201" x="20.061"/>
</g>
<g stroke="#7e7e7e" fill-rule="evenodd">
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" fill-opacity=".78431" height="15.759" width="8.8302" y="10.204" x="11.57" fill="#caedff"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="15.746" width="9.3343" y="10.211" x="2.0819" 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-opacity=".78431" height="15.746" width="9.3343" y="10.211" x="20.554" fill="#caedff"/>
</g>
<g>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="11.193" width="8.3267" stroke="#7e7e7e" y="10.912" x="21.058" stroke-width=".60683" fill="#eaeaea"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="2" width="13" y="25.366" x="14.033" fill="#333"/>
<rect style="color-rendering:auto;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;image-rendering:auto" height="2.5946" width="32" y="7.3748" x="-4.4834e-8" fill="#333"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="25"
width="50"
version="1.1"
viewBox="0 0 50 25.000001"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="bus_shelter_shadow.svg">
<metadata
id="metadata21">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1023"
id="namedview19"
showgrid="false"
inkscape:zoom="9.42"
inkscape:cx="11.04034"
inkscape:cy="12.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="defs4">
<filter
id="a"
style="color-interpolation-filters:sRGB">
<feFlood
result="flood"
flood-opacity=".50196"
flood-color="rgb(74,74,74)"
id="feFlood7" />
<feComposite
operator="in"
result="composite1"
in2="SourceGraphic"
in="flood"
id="feComposite9" />
<feGaussianBlur
stdDeviation="1"
result="blur"
in="composite1"
id="feGaussianBlur11" />
<feOffset
result="offset"
dx="0"
dy="0"
id="feOffset13" />
<feComposite
operator="atop"
result="composite2"
in2="offset"
in="offset"
id="feComposite15" />
</filter>
</defs>
<path
style="color:#000000;isolation:auto;mix-blend-mode:normal;solid-color:#000000;fill:#7e7e7e;fill-rule:evenodd;filter:url(#a);color-rendering:auto;image-rendering:auto;shape-rendering:auto"
d="m 10.287229,5.4962 -1.0164999,1.8676 1.5819999,0 -6.8500999,11.872 -2.4749,3.9911 1.0879,0 2.4749,-3.9911 8.1522999,0 -2.4749,3.9911 1.0879,0 2.4749,-3.9869 8.1504,0 -2.4749,3.9869 1.0879,0 2.4749,-3.9911 8.1523,0 -2.4749,3.9911 1.0879,0 2.4749,-4.1753 6.8501,-11.688 1.6113,0 1.0165,-1.8676 z"
id="path17"
inkscape:connector-curvature="0" />
</svg>
......@@ -80,7 +80,7 @@ class Main {
});
};
let adIconsList = [ "unknown", "billboard", "board", "column", "flag", "poster_box", "screen", "sign", "totem" ];
let adIconsList = [ "unknown", "billboard", "board", "bus_shelter", "column", "flag", "poster_box", "screen", "sign", "totem" ];
for(let i=0; i < adIconsList.length; i++) {
let adIcon = adIconsList[i];
adIcons[adIcon] = {
......@@ -188,10 +188,15 @@ class Main {
this._ids[e.type+e.id] = true;
let advertisingVal = (adIcons[e.tags.advertising]) ? e.tags.advertising : "unknown";
//Special case: advert in bus shelter
if(e.tags.highway == "bus_stop" || e.tags.public_transport == "platform" || e.tags.support == "street_furniture:transit_shelter" || e.tags.shelter == "yes") {
advertisingVal = "bus_shelter";
}
//Create popup content
let popupContent = document.createElement("div"); //this._getPoiPopupHTML(e.tags, e.id);
let title = document.createElement("h3");
title.appendChild(document.createTextNode(e.tags.advertising.replace("_", " ").capitalizeFirstLetter()));
title.appendChild(document.createTextNode(advertisingVal.replace("_", " ").capitalizeFirstLetter()));
popupContent.appendChild(title);
let details = document.createElement("p");
......
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