Skip to content

Commit

Permalink
change icon path for zone map #3652
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeneuvrier committed Jan 31, 2025
1 parent 8be8a77 commit 2e954c7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions public/js/zone_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);

// Correction des chemins des icônes
delete (L.Icon.Default.prototype)._getIconUrl
L.Icon.Default.mergeOptions({
iconRetinaUrl: '/build/images/leaflet/marker-icon-2x.png',
iconUrl: '/build/images/leaflet/marker-icon.png',
shadowUrl: '/build/images/leaflet/marker-shadow.png'
})

var zoneWkt = document.getElementById('info_zone_map').getAttribute('data-zone');
const zoneGeoJson = omnivore.wkt.parse(zoneWkt);
map.fitBounds(zoneGeoJson.getBounds());
Expand Down

0 comments on commit 2e954c7

Please sign in to comment.