-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (57 loc) · 2.36 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>WebGL Wind 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/v1.0.0/mapbox-gl.js'></script>
<script src='js/functions.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width: 100%; }
#gui {position:absolute; top:0; bottom:0; width: 15rem; height: 30rem; background-color: rgba(38, 30, 48, 0.548);}
.slider {
-webkit-appearance: none;
width: 80%;
height: 15px;
border-radius: 5px;
background: #d3d3d3;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
margin-top: 5px;
}
#gui-container {
margin-left: 10px;
}
p {
color: gray;
font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
<div id='map'></div>
<div id="gui">
<div id="gui-container">
<p> Particle number </p> <p id="number"></p>
<input onchange="setParticle()" id="particlenbr" type="range" min="10" max="1000" value="500" class="slider">
<br>
<p> Particle Speed</p>
<input onchange="setParticleSpeed()" id="particlespeed" type="range" min="0.01" max="3000" value="50" class="slider">
<p> Particle Size</p>
<input onchange="setParticleSize()" id="particlesize" type="range" min="1.0" max="4.0" value="2" class="slider">
<p> Particle Update Frequency</p>
<input onchange="setDropFreq()" id="dropfreq" type="range" min="1" max="1000" value="5" class="slider">
<br>
<p>This map is made using Mapbox GL JS library. The wind visualization is made in a WebGL-layer using data from SMHI Open Data API.
<br><br>
<a href="https://github.com/PatrikSylve/WindMap">GitHub repository</a>
<output></output>
</div>
</div>
<script src="js/mapbox.js"></script>
</body>
</html>