rodolpheg

Untitled

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