diff options
Diffstat (limited to 'demo4.html')
-rw-r--r-- | demo4.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/demo4.html b/demo4.html new file mode 100644 index 0000000..82ce265 --- /dev/null +++ b/demo4.html @@ -0,0 +1,55 @@ +<html> + <head> + <link rel="stylesheet" href="leaflet/dist/leaflet.css" /> + <script src="leaflet/dist/leaflet-src.js"></script> + + <style> + body { + padding: 0; + margin: 0; + } + + html, body, #map { + height: 100%; + } + </style> + </head> + <body> + <div id="map"> + </div> + + <script> + var artHouseCafe = [50.9087036, -1.4045204]; + + var map = L.map('map', { + center: artHouseCafe, // The Art House Cafe + zoom: 18 + }); + + var tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' + }); + + tileLayer.addTo(map); + + // Add a marker over the Art House Cafe + + var marker = L.marker(artHouseCafe) + + marker.addTo(map); + + // Add a popup to the marker + + marker.bindPopup("The Art House Cafe"); + + // Add a circle to the map + + var circle = L.circle(artHouseCafe, 50, { + color: 'red', + fillColor: '#f03', + fillOpacity: 0 + }).addTo(map); + + </script> + </body> +</html> |