Facebook
From Rafal, 2 Months ago, written in HTML5.
Embed
Download Paste or View Raw
Hits: 55
  1. <!DOCTYPE html>
  2. html,body,#map{width:100%;height:100%;padding:0;margin:0;}
  3.  
  4. <title> Mój pierwszy geoportal w leaflet</title>
  5. <link rel="icon" type="image/ico" href="tree.ico"/>
  6. <meta charset="UTF=8">
  7. </head>
  8.  
  9. <div id="map">
  10.  
  11. <link rel="stylesheet" href="leaflet/leaflet.css">
  12. <script src="leaflet/leaflet.js"></script>
  13.  
  14.  
  15. var mymap=L.map('map',{maxZoom:20}).setView([52.02,20.19],13);
  16. var osm=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'})
  17. osm.addTo(mymap);
  18.  
  19. var popup=L.popup().setLatLng([52.02,20.19]).setContent("Samotny popun w centrum mapy").openOn(mymap);
  20. var market = L.marker([52.03,20.19]).addTo(mymap);
  21. marker.bindPopup("Popup przypińôty do markera");
  22. marker.bindTooltip("<b>tooltip</b>").openTooltip();
  23.  
  24.  
  25.  
  26.  
  27. </body>
  28. </html>
  29.