Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Importation d'une couche GeoJSON grâce au plugin "leaflet-ajax"
- // Utilisation de onEachFeature pour attribuer une fonction à chaque entité : https://leafletjs.com/reference-1.6.0.html#geojson-oneachfeature
- var poly = new L.GeoJSON.AJAX('Montreal_v0743.json');
- poly.addTo(maCarte);
- // Ajout de la référence pour les données
- maCarte.attributionControl.addAttribution('Données © <a href="http://statisticscanada.ca/">Statistiques Canada</a>');
Advertisement
Add Comment
Please, Sign In to add comment