-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_v1.html
49 lines (43 loc) · 1.29 KB
/
index_v1.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
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' />
<style>
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
<div id='map'></div>
<script>
/*
mapboxgl.accessToken =
'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
*/
var map = new mapboxgl.Map({
container: 'map',
//style: 'mapbox://styles/mapbox/streets-v9',
center: [106.3705298, 10.2338635],
zoom: 15,
style: {
'version': 8,
'sources': {
'raster-tiles': {
'type': 'raster',
'tiles': [
//'https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'
'https://mt0.google.com/vt/lyrs=p&hl=en&x={x}&y={y}&z={z}'
],
'tileSize': 256,
}
},
'layers': [{
'id': 'simple-tiles',
'type': 'raster',
'source': 'raster-tiles',
'minzoom': 0,
'maxzoom': 22
}]
}
});
</script>