-
Notifications
You must be signed in to change notification settings - Fork 5
/
example.html
34 lines (29 loc) · 961 Bytes
/
example.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
<!doctype html>
<html>
<head>
<link href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" rel="stylesheet">
<style>
#map {
height: 600px;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script src="wikigeo.js"></script>
<script>
$(document).ready(function() {
// make a leaflet map with openstreetmap tiles
var map = L.map('map').setView([40.67, -73.94], 13);
var osmLayer = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {});
osmLayer.addTo(map);
// get the geojson and add to the map
geojson([-73.94, 40.67], {radius: 10000, limit: 50}, function(data) {
L.geoJson(data).addTo(map)
});
});
</script>
</body>
</html>