-
Notifications
You must be signed in to change notification settings - Fork 1
/
greenspacev2.html
358 lines (334 loc) · 12.5 KB
/
greenspacev2.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<!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.44.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<style>
#map {
position: fixed;
width:60%;
}
#features {
width: 40%;
margin-left: 60%;
font-family: Arial;
overflow-y: scroll;
background-color: #fafafa;
}
section {
padding: 25px 50px;
line-height: 25px;
border-bottom: 1px solid #ddd;
opacity: 0.25;
font-size: 20px;
}
section.active {
opacity: 0.75;
}
section:last-child {
border-bottom: none;
margin-bottom: 1000px;
}
.mapboxgl-popup {
max-width: 400px;
font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
}
</style>
<div id='map'></div>
<div id='features'>
<section id='welcome' class='active'>
<h3>The 10 biggest parks in Great Britain</h3><br>
<img src="https://raw.githubusercontent.com/egil1978/egil1978.github.io/master/Ordnance%20Survey%20Logo%20RGB_144.png" style="width:40%;height:40%;"><br>
<font size="2">Based on Ordnance Survey Open GreenSpace Data</font><br>
<font size="1">Contains OS data © Crown copyright and database rights 2018</font>
</section>
<section id='section1'>
<font color="#438519"><h4>1. Windsor Great Park, Berkshire (28.53km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-windsor-weybridge-bracknell.html" target="_blank">160 Windsor, Weybridge & Bracknell<a/><br>
OS Grid Ref: SU 9599 7210<br>
Attractions: Virginia Water Lake, The Copper Horse (statue), Valley Gardens woodland walks.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: No</h6><br>
</section>
<section id='section2'>
<font color="#438519"><h4>2. Cannock Chase Country Park, Staffordshire (19.56km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-cannock-chase-chasewater.html" target="_blank">244 Cannock Chase & Chasewater<a/><br>
OS Grid Ref: SK 0358 1408<br>
Attractions: Visitor Centre, Great War Hut, outdoor activity areas.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: Yes</h6><br>
</section>
<section id='section3'>
<font color="#438519"><h4>3. Rutland Water, Rutland (16.95km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-rutland-water.html" target="_blank">234 Rutland Water<a/><br>
OS Grid Ref: SK 9337 0724<br>
Attractions: Anglian Water Birdwatching Centre, Lyndon Visitor Centre, Water sports.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: Yes</h6><br>
</section>
<section id='section4'>
<font color="#438519"><h4>4. Whinlatter Forest Park, Cumbria (13.49km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-the-lake-district-north-western-area.html" target="_blank">OL4 English Lakes</a><br>
OS Grid Ref: NY 1968 2490<br>
Attractions: Whinlatter Pass, Visitor Centre, Mountain Bike Hire.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: Yes</h6><br>
</section>
<section id='section5'>
<font color="#438519"><h4>5. Holkham Park, Norfolk (12.02km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-norfolk-coast-central.html" target="_blank">251 Norfolk Coast Central</a><br>
OS Grid Ref: TF 8925 4378<br>
Attractions: Holkham Hall, Holkham Beach and Nature Reserve.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: £3 per day<br>
Parkrun: No</h6><br>
</section>
<section id='section6'>
<font color="#438519"><h4>6. Richmond Park, Greater London (9.53km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-london-south.html" target="_blank">161 London South</a><br>
OS Grid Ref: TQ 1745 7558<br>
Attractions: Isabella Plantation woodland gardens, King Henry’s Mound, Pembroke Lodge tea rooms.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Free<br>
Parkrun: Yes</h6><br>
</section>
<section id='section7'>
<font color="#438519"><h4>7. Moel Famau Country Park, Clwyd (8.63km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-clwydian-range.html" target="_blank">265 Clwydian Hills / Bryniau Clwyd</a><br>
OS Grid Ref: SJ 1614 6260<br>
Attractions: The Jubilee Tower, Offa’s Dyke National Trail.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: No</h6><br>
</section>
<section id='section8'>
<font color="#438519"><h4>8. Sutton Park, West Midlands (8.40km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-birmingham.html" target="_blank">220 Birmingham</a><br>
OS Grid Ref: SP 1191 9636<br>
Attractions: Sutton Park Visitor Centre, Donkey Sanctuary, model aircraft flying field.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: No</h6><br>
</section>
<section id='section9'>
<<font color="#438519"><h4>9. John Muir Country Park, East Lothian (6.82km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-dunbar-north-berwick.html" target="_blank">351 Dunbar & North Berwick</a><br>
OS Grid Ref: NT 679 789<br>
Attractions: Virginia Water Lake, The Copper Horse (statue), Valley Gardens woodland walks.<br>
Restaurants/Café: Yes<br>
Picnic Areas: Yes<br>
Children’s Play Areas: Yes<br>
Car Parking: Yes<br>
Parkrun: No</h6><br>
</section>
<section id='section10'>
<font color="#438519"><h4>10. Lamington Park, Ross and Cromarty (6.52km2)</h4></font>
<h6>Explorer: <a href="https://www.ordnancesurvey.co.uk/shop/maps/explorer-map-dornoch-tain.html" target="blank">438 Dornoch & Tain</a><br>
OS Grid Ref: NH 7404 7647<br>
Attractions: Aldie Burn, cycle trails, horse riding.<br>
Restaurants/Café: No<br>
Picnic Areas: Yes<br>
Children’s Play Areas: No<br>
Car Parking: Yes<br>
Parkrun: No</h6><br>
</section>
</div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiZ2VvZGF0YXZpeiIsImEiOiJjamgyM2kycXkwOTYwMnptanJueDhlMTdwIn0.cf14J_rCTb_DuqYarLXtlA';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/geodataviz/cjizu6mot0xt02tlludulmpi7',
bearing: 0,
center: [-1.038997, 53.211250],
zoom: 6,
speed: 0.5,
pitch: 0,
});
map.on('load', function () {
// Add a layer showing the places.
map.addLayer({
"id": "places",
"type": "symbol",
"source": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"description": "<strong>Windsor Great Park</strong><br><img src="https://raw.githubusercontent.com/egil1978/egil1978.github.io/master/Biggest%20Parks%20-%20Windsor.jpg" style="width:40%;height:40%;"><p>Former royal private hunting ground of Windsor Castle famed for its Long Walk and deer park. Great for views of Windsor Castle, picnicking on the lawns, and lakeside strolls along Virginia Water Lake.</p>",
"icon": "park"
},
"geometry": {
"type": "Point",
"coordinates": [-0.61426, 51.45552]
}
}]
}
},
"layout": {
"icon-image": "{icon}-15",
"icon-allow-overlap": true
}
});
// When a click event occurs on a feature in the places layer, open a popup at the
// location of the feature, with description HTML from its properties.
map.on('click', 'places', function (e) {
var coordinates = e.features[0].geometry.coordinates.slice();
var description = e.features[0].properties.description;
// Ensure that if the map is zoomed out such that multiple
// copies of the feature are visible, the popup appears
// over the copy being pointed to.
while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
}
new mapboxgl.Popup()
.setLngLat(coordinates)
.setHTML(description)
.addTo(map);
});
// Change the cursor to a pointer when the mouse is over the places layer.
map.on('mouseenter', 'places', function () {
map.getCanvas().style.cursor = 'pointer';
});
// Change it back to a pointer when it leaves.
map.on('mouseleave', 'places', function () {
map.getCanvas().style.cursor = '';
});
});
var chapters = {
'welcome': {
bearing: -0,
center: [-1.038997, 53.211250],
zoom: 6,
speed: 0.5,
pitch: 0
},
'section1': {
bearing: 0,
center: [-0.626849, 51.437566],
speed: 0.2,
zoom: 12,
pitch: 0
},
'section2': {
center: [-1.988970, 52.746541],
bearing: 0,
zoom: 12,
speed: 0.2,
pitch: 0
},
'section3': {
bearing: 82.40,
center: [-0.666048, 52.658909],
zoom: 12,
speed: 0.2,
pitch: 0
},
'section4': {
bearing: 0,
center: [-3.230461, 54.610283],
zoom: 13,
speed: 0.2,
pitch: 0
},
'section5': {
bearing: 0,
center: [0.809602, 52.941621],
zoom: 13.36,
pitch: 0,
speed: 0.2
},
'section6': {
bearing: 0,
center: [-0.606244, 51.482524],
zoom: 13.5,
pitch: 0,
speed: 0.2
},
'section7': {
bearing: 0,
center: [-3.270606, 53.151875],
zoom: 13.16,
speed: 0.2,
pitch: 0
},
'section8': {
bearing: 0,
center: [-1.853883, 52.570039],
zoom: 13.73,
speed: 0.2,
pitch: 0
},
'section9': {
bearing: 0,
center: [-2.580636, 56.012381],
zoom: 14,
speed: 0.2,
pitch: 0
},
'section10': {
bearing: 0,
center: [-4.121487, 57.770886],
zoom: 13.29,
speed: 0.2,
pitch: 0
},
};
// On every scroll event, check which element is on screen
window.onscroll = function() {
var chapterNames = Object.keys(chapters);
for (var i = 0; i < chapterNames.length; i++) {
var chapterName = chapterNames[i];
if (isElementOnScreen(chapterName)) {
setActiveChapter(chapterName);
break;
}
}
};
var activeChapterName = 'baker';
function setActiveChapter(chapterName) {
if (chapterName === activeChapterName) return;
map.flyTo(chapters[chapterName]);
document.getElementById(chapterName).setAttribute('class', 'active');
document.getElementById(activeChapterName).setAttribute('class', '');
activeChapterName = chapterName;
}
function isElementOnScreen(id) {
var element = document.getElementById(id);
var bounds = element.getBoundingClientRect();
return bounds.top < window.innerHeight && bounds.bottom > 0;
}
</script>
</body>
</html>
view rawresumap.html hosted with ❤ by GitHub