Advertisement
Shohreh

Carte OSM - MonSpad

Feb 23rd, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
  5. <script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js" integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw==" crossorigin=""></script>
  6. </head>
  7. <body>
  8. <div id="mapDiv" style="width: 800px; height: 500px"></div>
  9. <script>
  10. // position we will use later
  11. var lat = 48.88461;
  12. var lon = 2.28964;
  13. // initialize map
  14. map = L.map('mapDiv').setView([lat, lon], 13);
  15. // set map tiles source
  16. L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
  17. attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
  18. maxZoom: 18,
  19. }).addTo(map);
  20. // add marker to the map
  21. marker = L.marker([lat, lon]).addTo(map);
  22. // add popup to the marker
  23. marker.bindPopup("<b>Monspad</b><br />16, Boulevard Gouvion-Saint-Cyr 75017").openPopup();
  24. </script>
  25. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement