-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapPageTemplate.html
109 lines (91 loc) · 3.02 KB
/
mapPageTemplate.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!-- Linking the css and javascript files -->
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript" src="scripts.js"></script>
<!-- MapBox Stuff -->
<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>
<script src='data/exampleData.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.css' rel='stylesheet' />
<style>
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<!--Forward/Backward Arrows-->
<span>
<!--<a href="style.css">-->
<img class="arrow" id="arrowLeft" alt="PUT THE NAME OF THE FILE YOU WANT TO GO TO IN HERE."/>
<!--</a>-->
</span>
<span>
<!--<a href="images/image1.png">-->
<img class="arrow" id="arrowRight" alt="PUT THE NAME OF THE FILE YOU WANT TO GO TO IN HERE."/>
<!--</a>-->
</span>
<!--Put everything inside the body-->
<body>
<div id='map'>
</div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiZmxpbSIsImEiOiJjajZ2bmM5OGwxMnIwMnJwaHBpb3J5bmYyIn0.UQcJRgHS48EKDchpVWg6zA';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v9',
center: [151, -33.9],
zoom: 10,
pitch: 40,
bearing: 20
});
map.on('load', function() {
map.addLayer({
'id': 'data',
'type': 'fill-extrusion',
'source': {
// Geojson Data source used in vector tiles, documented at
// https://gist.github.com/ryanbaumann/a7d970386ce59d11c16278b90dde094d
'type': 'geojson',
'data': data
},
'paint': {
// See the Mapbox Style Spec for details on property functions
// https://www.mapbox.com/mapbox-gl-style-spec/#types-function
'fill-extrusion-color': {
// Get the fill-extrusion-color from the source 'color' property.
'property': 'mal_fem',
'stops': [
[-0.5, 'yellow'],
[-0.3, 'red']
]
},
'fill-extrusion-height': {
// Get fill-extrusion-height from the source 'height' property.
'property': 'pop_tot',
'stops': [
[0.4, 0],
[0.6, 2000]
]
},
'fill-extrusion-base': {
// Get fill-extrusion-base from the source 'base_height' property.
'property': 'base_height',
'type': 'identity'
},
// Make extrusions slightly opaque for see through indoor walls.
'fill-extrusion-opacity': 1
}
});
});
</script>
/* I think this stuff is useless: */
<footer>
<h1>
Title
</h1>
<p>
Paragraph stuff that goes into more detail about the stuff that needs to be described.
</p>
</footer>
</body>