-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (46 loc) · 1.76 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { background: #292d39; margin:0; padding: 10px; color: #fff; font-family: 'Open Sans', 'Arial', sans-serif; }
#container { display: flex; flex-direction: column; align-items: center; }
#map { height: 400px; width: 600px; border: #4ba6dd solid 4px; }
#footnote { font-style: italic; font-weight: lighter; font-size: 14px; }
#azavea { transform: scale(0.35); }
</style>
</head>
<body>
<div id='container'>
<h1>Lower North Planning District Zoning</h1>
<p>Data from OpenDataPhilly.org</h2>
<div id='map'></div>
<p id='footnote'>Example created for the September 13, 2017 meeting of DVRPC IREG.</p>
<img id='azavea' src='https://www.azavea.com/wp-content/uploads/2016/06/azavea-logo-invert-2x.png'/>
</div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiYWFyb25kZW5uaXMiLCJhIjoiY2o3N295dWNoMWUyOTJxbXRqZWU2MGZkbiJ9.LScPB7xy92fpu2RJ7IDOAQ';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/aarondennis/cj77wthr05h712sqru1io8sla'
});
map.addControl(new mapboxgl.NavigationControl());
// Focus on the Lower North Planning District
map.on('load', function() {
map.setFilter('building', ['==', 'district', 'Lower North']);
map.setFilter('zoning', ['==', 'district', 'Lower North']);
map.setFilter('district', ['==', 'district', 'Lower North']);
map.jumpTo({
center: [-75.1614, 39.979],
zoom: 13,
bearing: 0,
pitch: 53
});
});
</script>
</body>
</html>