-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (83 loc) · 2.38 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://api.mapbox.com/mapbox-gl-js/v2.1.1/mapbox-gl.css' rel='stylesheet' />
<style>
* {
margin: 0;
padding: 0;
}
#map {
width: 100vw;
height: 100vh;
}
.coordinates {
background: rgba(255, 255, 255, 0.693);
color: #fff;
position: absolute;
bottom: 70px;
left: 10px;
padding: 5px 10px;
margin: 0;
font-size: 11px;
line-height: 18px;
border-radius: 3px;
display: inline-block;
}
div.cont {
color: rgba(0, 0, 0, 0.721);
padding: 5px;
font-size: 12px;
}
.color {
width: 12px;
height: 12px;
background-color: black;
display: inline-block;
margin-right: 3px;
}
</style>
<title>Coronavirus Plotter</title>
</head>
<body>
<div id='map'></div>
<div id="coordinates" class="coordinates">
<div class="cont">
<div class="color" style="background-color: rgb(255, 0, 0);"></div> Cases are greater than 1,500,000
</div>
<div class="cont">
<div class="color" style="background-color: rgb(125, 14, 14);"></div> Cases are equal or lesser than 1,500,000 and
are greater than 500,000
</div>
<div class="cont">
<div class="color" style="background-color: rgb(77, 8, 8);"></div> Cases are equal or lesser than 500,000 and are
greater than 15,000
</div>
<div class="cont">
<div class="color" style="background-color: rgb(38, 3, 3);"></div> Cases are lesser than 15,000
</div>
</div>
</body>
<script src='https://api.mapbox.com/mapbox-gl-js/v2.1.1/mapbox-gl.js'></script>
<script>
var bounds = [
[-152.38819636287263, -46.309389473821575], // Southwest coordinates
[187.9785583875584, 76.53535825882565] // Northeast coordinates
];
mapboxgl.accessToken = 'pk.eyJ1IjoiaGFyc2hpdDMxODIwMDgiLCJhIjoiY2twMHZlc2RrMHJ5dzJ3bnp4aXppbWZzYSJ9.XHFaJbWM_SykniXr6vH3sg';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/dark-v10',
zoom: 1,
continuousWorld: false,
noWrap: true,
maxBounds: bounds
});
map.dragRotate.disable();
map.touchZoomRotate.disableRotation();
</script>
<script src="./index.js"></script>
</html>