show icons in popup

This commit is contained in:
Tykayn 2024-12-16 12:20:00 +01:00 committed by tykayn
parent 614fd9b6ac
commit 48ec1f554a
4 changed files with 28 additions and 5 deletions

26
img/Type2_socket.svg Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg version="1.1" id="svg2" viewBox="0 0 479.99999 480.00001" height="512" width="512" inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)" sodipodi:docname="Type2_socket.svg" inkscape:export-filename="/Users/sss/Desktop/EV Plugs/type 2 mennekes.png" inkscape:export-xdpi="600" inkscape:export-ydpi="600" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1654" inkscape:window-height="1311" id="namedview18" showgrid="true" inkscape:zoom="0.89702955" inkscape:cx="229.08944" inkscape:cy="364.53649" inkscape:window-x="4522" inkscape:window-y="448" inkscape:window-maximized="0" inkscape:current-layer="layer1" units="px" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1">
<inkscape:grid type="xygrid" id="grid4146" originx="0" originy="0" spacingy="1" spacingx="1" units="px" visible="true"/>
</sodipodi:namedview>
<defs id="defs4"/>
<metadata id="metadata7">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g id="layer1" transform="translate(0,-572.36211)">
<ellipse ry="29.605898" rx="28.831806" cy="863.45276" cx="287.39853" id="ellipse4206" style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
<ellipse style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="ellipse4208" cx="195.07442" cy="863.45276" rx="28.831806" ry="29.605898"/>
<ellipse ry="29.605898" rx="28.831806" cy="783.49713" cx="151.62775" id="ellipse4210" style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
<ellipse style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="ellipse4212" cx="241.2365" cy="783.49713" rx="28.831806" ry="29.605898"/>
<ellipse ry="29.605898" rx="28.831806" cy="783.49713" cx="329.48752" id="ellipse4214" style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
<ellipse style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="ellipse4216" cx="286.7197" cy="718.5332" rx="21.048679" ry="22.848875"/>
<ellipse ry="22.848875" rx="21.048679" cy="718.5332" cx="198.4687" id="ellipse4218" style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:20.3131;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"/>
<path id="path4231" d="m 150.26998,651.42769 c 61.54944,0 123.09888,0 184.64832,0 20.17484,13.17001 36.82668,31.56026 47.83196,53.72908 20.49021,35.68261 28.13091,79.06435 19.9538,119.99141 -10.47048,53.7074 -48.97131,98.01081 -94.93993,121.82952 -21.92824,9.33503 -45.30598,16.18576 -69.18525,13.89527 -26.37187,-1.25577 -52.10774,-10.40506 -75.44001,-23.01925 -42.70535,-23.79394 -72.273653,-69.60573 -83.042673,-118.53424 -8.66263,-42.69893 -0.95349,-89.21413 24.102573,-124.46997 11.64342,-17.98615 27.70792,-33.36137 46.07121,-43.42182 z" style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:currentColor;stroke-width:21.9735;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" inkscape:connector-curvature="0"/>
</g>
<script xmlns=""/></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="100mm" height="88.855431mm" viewBox="0 0 100 88.855431" version="1.1" id="svg5" inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)" sodipodi:docname="type2.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><script xmlns=""/></svg>

Before

Width:  |  Height:  |  Size: 509 B

View File

@ -98,7 +98,7 @@
<img class="icon-img" src="img/Type2_Connector_Outline.svg" alt="type2">
<img class="icon-img" src="img/type2_combo.svg" alt="prise">
<img class="icon-img" src="img/socket_type2.svg" alt="prise">
<img class="icon-img" src="img/Type2_socket.svg" alt="prise">
<img class="icon-img" src="img/socket_typee.svg" alt="prise">
<img class="icon-img" src="img/chademo.svg" alt="prise">
</div>

View File

@ -396,7 +396,7 @@ function displayPointsFromApi (points) {
let type2 = feature.properties.tags['socket:type2']
let type2_combo = feature.properties.tags['socket:type2_combo']
if(type2){
popupContent+=' <img class="icon-img" src="img/socket_type2.svg" alt="prise de type 2">'
popupContent+=' <img class="icon-img" src="img/Type2_socket.svg" alt="prise de type 2">'
if(type2!=='yes'){
popupContent+= '<span class="socket-counter">x '+type2+'</span>'
}