map_template.tpl 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Quick Start - Leaflet</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
  8. <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
  9. <script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
  10. </head>
  11. <body>
  12. <div id="mapid" style="width: 600px; height: 400px;"></div>
  13. <script>
  14. var mymap = L.map('mapid').setView([44.4936714,11.3430347], 13);
  15. L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', {
  16. maxZoom: 18,
  17. attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
  18. '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
  19. 'Imagery © <a href="http://mapbox.com">Mapbox</a>',
  20. id: 'mapbox.streets'
  21. }).addTo(mymap);
  22. var marker = L.marker([44.5038497,11.3139989]).addTo(mymap);
  23. marker.bindPopup("<b>Ospedale Maggiore</b><br>{{item}} barbone").openPopup();
  24. </script>
  25. </body>
  26. </html>