diff --git a/resources/views/components/events-map.blade.php b/resources/views/components/events-map.blade.php index e79a181c..3ad14dee 100644 --- a/resources/views/components/events-map.blade.php +++ b/resources/views/components/events-map.blade.php @@ -66,6 +66,7 @@ className: 'EventsMap-marker-icon EventsMap-marker-icon--far', var markerIconNear = L.divIcon({ className: 'EventsMap-marker-icon EventsMap-marker-icon--near', iconSize: [25, 25], + html: '' }); class EventsMap { @@ -97,7 +98,9 @@ class EventsMap { .bindPopup(`
- + + +
${event.time} • ${event.type} @@ -160,14 +163,17 @@ class EventsMap { */ this.map.on('zoomend', () => { if (this.map.getZoom() >= 10) { + let prevIcon; this.map.eachLayer(function(layer) { - if (layer instanceof L.Marker) { + if (layer instanceof L.Marker && layer._icon.classList.contains( + 'EventsMap-marker-icon')) { layer.setIcon(markerIconNear); } }); } else { this.map.eachLayer(function(layer) { - if (layer instanceof L.Marker) { + if (layer instanceof L.Marker && layer._icon.classList.contains( + 'EventsMap-marker-icon')) { layer.setIcon(markerIconFar); } }); @@ -247,7 +253,7 @@ class EventsMap { .EventsMap.is-expanded { position: fixed !important; - height: 100vh; + height: 100dvh; top: 0; left: 0; right: 0;