-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.html
78 lines (69 loc) · 2.71 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<title>Maptime LA: Neighborhood Council Map</title>
<meta charset="utf-8" />
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<script src="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
</head>
<body>
<div id="map"></div>
<div id="info"><h1>Map of Los Angeles Neighborhood Councils</h1><p>Made by Vectoria, the maptime bear</p></div>
<script>
var map = L.map('map')
.setView([34.052234, -118.243685], 10);
//Code to add Basemap
var latimes = L.tileLayer('http://{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png').addTo(map);
//Create locations for geojson
var nc_boundaries="data/nc_boundaries.geojson";
var nc_locations="data/nc_locations.geojson";
//Styles and loads the Neighborhood Council Boundaries
var ncboundaries = $.getJSON(nc_boundaries, function(data) {
L.geoJson(data, {
style:{
fillColor:"#ff7f00",
color: "#ff7f00",
weight: 1,
opacity: 1,
fillOpacity: 0.2,
clickable: false
}
}).addTo(map).bringToBack();
});
//Styles and loads the Meeting Locations of the Neighborhood Councils
var nclocations = $.getJSON(nc_locations, function(data) {
L.geoJson(data, {
style:{
radius: 5,
fillColor:"#ff7f00",
color: "#000",
weight: 0,
opacity: 0,
fillOpacity: 0.8
},
pointToLayer: function(feature, latlon) {
return L.circleMarker(latlon).bindPopup("<h2>"+feature.properties.neighborhood_council_name+"</h2>"+feature.properties.meeting_location);
}
}).addTo(map)
});
//This links to data.lacity.org
/*
var pizzalocations = $.getJSON('https://data.lacity.org/resource/66es-k6kk.json', function(data) {
$.each(data, function(index, value) {
L.circle([value.location_1.latitude,value.location_1.longitude],100,
{
color: '#5a8bc8',
weight:0.0,
fillColor: '#5a8bc8',
fillOpacity: 1,
}
).addTo(map).bindPopup(value.business_name);
});
});
*/
</script>
</body>
</html>