Skip to content

Commit

Permalink
Merge pull request #3653 from MTES-MCT/hotfix/3652-bo--zone-marqueurs…
Browse files Browse the repository at this point in the history
…-casses-carto

[BO - Zone] Changement de chemins pour les icônes des marqueurs
  • Loading branch information
numew authored Feb 3, 2025
2 parents cf25988 + 2e954c7 commit 2ca30cd
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 2ca30cd

Please sign in to comment.