-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeatures-icons.html
47 lines (38 loc) · 1.22 KB
/
features-icons.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
46
<!DOCTYPE html>
<html>
<head>
<title>wtf</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /><![endif]-->
<style>
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script src="leaflet.ajax.min.js"></script>
<script>
var map = L.map('map', {maxZoom: 10});
map.setView([41.4261, -105.5153], 4);
L.tileLayer('http://d5cy2ubdj7ciu.cloudfront.net/{z}/{x}/{y}.jpg', {
maxZoom: 10
}).addTo(map);
var layer = new L.GeoJSON.AJAX("features.json", {
onEachFeature: function (feature, layer) {
layer.on('click', function (e) {
console.log(layer);
});
}
}).addTo(map);
console.log(layer)
</script>
</body>
</html>