-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaflet.html
45 lines (33 loc) · 1.05 KB
/
leaflet.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!doctype html>
<html>
<head>
<!-- Adding in the Leaflet CSS file -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<!-- Adding Leaflet JavaScript file -->
<script src="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.js"></script>
<!-- Adding styling info for the map -->
<style type="text/css">
#map { height: 600px; }
</style>
</head>
<body>
<!-- Creating the map div -->
<div id="map"></div>
<!-- The JavaScript that's powering the map -->
<script>
// Initialize the map
var map = L.map('map').setView([37.754700, -122.420790], 14);
// Add tiles
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// Add a marker
var marker = L.marker([37.754700, -122.420790]).addTo(map);
// Add a popup to the marker
marker.bindPopup("CCSF");
</script>
</body>
</html>