revert unfinished svg marker feature

This commit is contained in:
Gwendolyn 2024-03-28 22:21:52 +01:00
parent 4686bf21a7
commit ba47de5bb4

View file

@ -1554,16 +1554,11 @@ c3nav = {
c3nav.update_map_state(); c3nav.update_map_state();
c3nav.update_location_labels(); c3nav.update_location_labels();
}, },
_add_icon: async function (name) { _add_icon: function (name) {
var [markerSrc, shadowSrc] = await Promise.all([ c3nav[name+'Icon'] = new L.Icon({
fetch(`/static/img/marker.svg`).then(r => r.text()), iconUrl: '/static/img/marker-icon-'+name+'.png',
fetch(`/static/img/marker.svg`).then(r => r.text()) iconRetinaUrl: '/static/img/marker-icon-'+name+'-2x.png',
]); shadowUrl: '/static/leaflet/images/marker-shadow.png',
c3nav[name+'Icon'] = new SvgIcon({
className: `leaflet-marker-${name}`,
iconSvg: markerSrc,
shadowSvg: shadowSrc,
iconSize: [25, 41], iconSize: [25, 41],
iconAnchor: [12, 41], iconAnchor: [12, 41],
popupAnchor: [1, -34], popupAnchor: [1, -34],