-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (45 loc) · 1.61 KB
/
index.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
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<title>project Meetup | LA</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<script src="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([34.052234, -118.243685], 13);
L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{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://mapbox.com">Mapbox</a>',
id: 'examples.map-i875mjb7'
}).addTo(map);
//Create locations for geojson
var cities="data/lacities.geojson";
//Styles and loads the Hubs
$.getJSON(cities, function(data) {
var hubsLayer = L.geoJson(data, {
style:{
fillColor:"#ff7f00",
color: "#ff7f00",
weight: 0,
opacity: 0,
fillOpacity: 0.35
},
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.cities);
}
}).addTo(map);
});
</script>
</body>
</html>