-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.html
41 lines (38 loc) · 1.53 KB
/
view.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Bartholomap - time travel map</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.12.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.1/mapbox-gl.css' rel='stylesheet' />
<link href='https://fonts.googleapis.com/css?family=Overlock' rel='stylesheet' type='text/css'>
<style>
* {font-family: 'Overlock', sans-serif;}
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.mapboxgl-ctrl-bottom-right {
background: rgba(255,255,255,0.4);
padding: 2px;
}
a {
color: #555;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1Ijoid2hlcmVjYW1wZXUiLCJhIjoieHE4bVNuRSJ9.qFTj9L2TMzVXX8G2QwJl_g';
var map = new mapboxgl.Map({
container: 'map', // container id
style: 'mapbox://styles/wherecampeu/ciiap7a8j00bnnqlz6lw2pefo', //hosted style id
center: [0,51], // starting position
zoom: 1, // starting zoom
maxZoom: 6,
hash: true
});
document.getElementsByClassName('mapboxgl-ctrl-bottom-right')[0].innerHTML+='Background: <a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> <a href="http://www.openstreetmap.org/about/" target="_blank">© OpenStreetMap</a> | Isochrones by <a href="https://twitter.com/stvno">@stvno</a>';
</script>
</body>
</html>