-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdem-hillshade.html
49 lines (49 loc) · 1.75 KB
/
dem-hillshade.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Klokantech Basic - TileServer GL</title>
<link rel="stylesheet" href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.css' />
<!-- <script src="lib/mapbox-gl.js"></script> -->
<link rel="stylesheet" type="text/css" href="lib/mapbox.css" />
<script src='raster-dem/mapbox-gl-gsidem.js'></script>
<script src="lib/mapbox.js"></script>
<script src="lib/leaflet-hash.js"></script>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<h1 style="display:none;">Klokantech Basic</h1>
<div id='map'></div>
<script>
var q = (location.search || '').substr(1).split('&');
var preference =
q.indexOf('vector') >= 0 ? 'vector' :
(q.indexOf('raster') >= 0 ? 'raster' :
(mapboxgl.supported() ? 'vector' : 'raster'));
if (preference == 'vector') {
//mapboxgl.setRTLTextPlugin('lib/mapbox-gl-rtl-text.js');
var map = new mapboxgl.Map({
container: 'map',
center: [136.689, 38.565],
zoom: 5,
style: 'http://localhost:8080/styles/terrain-dem/style.json',
hash: true,
maxZoom: 15,
localIdeographFontFamily: "'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, メイリオ, sans-serif"
//localIdeographFontFamily: "'NotoSansJP-Regular', sans-serif"
});
map.addControl(new mapboxgl.NavigationControl());
} else {
var map = L.mapbox.map('map', 'terrain.json', { zoomControl: false });
new L.Control.Zoom({ position: 'topright' }).addTo(map);
setTimeout(function() {
new L.Hash(map);
}, 0);
}
</script>
</body>
</html>