forked from HarlanH/code-for-dc-edu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
39 lines (29 loc) · 1.22 KB
/
demo.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
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
<style>
#map { height: 340px;width:400px; }
</style>
</head>
<body>
<a href="#" id="makered"> I'd like it in red, please</a>.
<div id="map"></div>
<script>
$(function(){
var map = L.map('map').setView([38.895111, -77.036667], 13);
L.tileLayer('http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>'
}).addTo(map);
$.getJSON('clusters.geojson', function(data){
var clusters = L.geoJson(data).addTo(map);
})
})
</script>
</body>
</html>