-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
78 lines (73 loc) · 2.55 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Windmap</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link rel="stylesheet" href="lib/leaflet-v1.0.2.css" />
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.css' rel='stylesheet' />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"></link>
<link rel="stylesheet" href="components/app.css"></link>
<link rel="stylesheet" href="components/meteogram/src/MeteogramSky.css"></link>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; z-index:1; cursor:default; background:#202020; }
</style>
</head>
<body>
<div id='map'></div>
<div id='app'></div>
<script src="lib/leaflet-v1.0.2.js"></script>
<script src="lib/leaflet-hash.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js'></script>
<script src="https://unpkg.com/mapbox-gl-leaflet/leaflet-mapbox-gl.js"></script>
<script src="lib/chroma.min.js"></script>
<script src="streamline.js/streamline.js"></script>
<script src="streamline.js/leaflet-streamline.js"></script>
<script src="grib2tiles/grib2tile.js"></script>
<script src="leaflet-grib2tile.js"></script>
<script src="leaflet-windmap.js"></script>
<script src="bundle.js"></script>
<script>
var token = 'pk.eyJ1IjoidGF0dGlpIiwiYSI6ImxKQ1hwOXcifQ.xGx4WsNt9GMqbZ0T5A7C8Q';
var map = new L.map('map', {
center: [36.5, 137.6],
zoom: 5,
minZoom: 5,
maxZoom: 13,
attributionControl: false,
zoomControl: false
});
var hash = new L.Hash(map);
var basemap = L.mapboxGL({
accessToken: token,
style: 'mapbox://styles/tattii/ckr53v7t0126217tg01u80p0q'
}).addTo(map);
var basemapgl = basemap.getMapboxMap();
basemapgl.on("load", function () {
window.windmap = new L.Windmap(map);
window.map = map;
basemapgl.addSource("vt", {
"type": "vector",
"minzoom": 0,
"maxzoom": 10,
"tiles": ["https://weatherbox.github.io/warning-area-vt/v2/{z}/{x}/{y}.pbf"],
"attribution": '<a href="https://www.data.jma.go.jp/developer/gis.html" target="_blank">気象庁GISデータ</a>'
});
basemapgl.addLayer({
"id": "warning-area",
"type": "line",
"source": "vt",
"source-layer": "pref",
"paint": {
"line-color": "rgba(200, 200, 200, 0.97)",
"line-width": {
"base": 1.5,
"stops": [[4, 0.2], [8, 0.5]]
}
}
});
});
</script>
</body>
</html>