rodolpheg

Untitled

Feb 27th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <head>
  5. <title>Une carte editable par les utilisateurs/trices</title>
  6. <meta charset="UTF-8">
  7. <!-- https://leafletjs.com/download.html -->
  8. <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
  9. <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
  10. <style>
  11. /* On indique la taille de l'emplacement de la carte*/
  12. html, body {height: 100%; margin: 0;}
  13. #Carte { width: 100%; height: 100%; }
  14. </style>
  15. </head>
  16. <body>
  17. <div id='Carte'></div>
  18. <script>
  19. // créer la carte, remplacez VOTRE_TOKEN pour la clef que vous trouverez là : https://account.mapbox.com
  20. //var fondDeCarte = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/outdoors-v11/tiles/{z}/{x}/{y}?access_token=VOTRE_TOKEN');
  21. // décochez la ligne suivante si vous n'avez pas de compte MapBox
  22. var fondDeCarte = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
  23. var maCarte = L.map('Carte', {
  24. center: [45.52,-73.63],
  25. zoom: 13,
  26. layers: fondDeCarte,
  27. zoomControl: false
  28. });
  29. maCarte.setView([0,0], 2);
  30. </script>
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment