-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestemaps.html
More file actions
213 lines (199 loc) · 6.19 KB
/
Copy pathtestemaps.html
File metadata and controls
213 lines (199 loc) · 6.19 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Attach a popup to a marker instance</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v1.6.1/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v1.6.1/mapbox-gl.css" rel="stylesheet" />
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; };
</style>
</head>
<body>
<style>
#marker {
box-sizing: border-box;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 15px;
width: 39px;
height: 39px;
border-radius: 50%;
cursor: pointer;
background: linear-gradient(144.85deg, #D64848 13.74%, #F56B6B 93.64%);
}
#marker2 {
box-sizing: border-box;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 15px;
width: 39px;
height: 39px;
border-radius: 50%;
cursor: pointer;
background: linear-gradient(143.64deg, #46A95C 12.58%, #91C79D 94.56%);
}
#marker3 {
box-sizing: border-box;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 15px;
width: 39px;
height: 39px;
border-radius: 50%;
cursor: pointer;
background: linear-gradient(146.49deg, #E79D47 9.72%, #E4BD8F 91.83%);
}
#marker4 {
box-sizing: border-box;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 15px;
width: 39px;
height: 39px;
border-radius: 50%;
cursor: pointer;
background: linear-gradient(146.82deg, #DABC1D 35.87%, #D6CC9B 93.41%);
}
#marker5 {
box-sizing: border-box;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 15px;
width: 39px;
height: 39px;
border-radius: 50%;
cursor: pointer;
background: linear-gradient(147.34deg, #93A54E 18.87%, #B7C093 94.99%);
}
.mapboxgl-popup {
max-width: 200px;
}
/* The sidebar menu */
.sidenav {
height: 1024px; /* Full-height: remove this if you want "auto" height */
width: 268px; /* Set the width of the sidebar */
position: fixed; /* Fixed Sidebar (stay in place on scroll) */
z-index: 1; /* Stay on top */
top: 0; /* Stay at the top */
left: 10;
background-color: #FFFFFF;
overflow-x: hidden; /* Disable horizontal scroll */
padding-top: 277px;
box-shadow: 5px 4px 9px rgba(0, 0, 0, 0.25);
box-sizing: ;
}
/* The navigation menu links */
.sidenav a {
padding: 6px 8px 6px 16px;
line-height: 21px;
width: 201px;
padding-left: 38px;
text-align: center;
text-decoration: none;
font-family:Georgia, 'Times New Roman', Times, serif;
font-style: normal;
font-weight: 300;
font-size: 18px;
color: #000000;
display: block;
box-shadow: 5px 2px 5px rgba(0,0,0,0.15);
}
.sidenav a:hover {
box-sizing: 1px 1px 1px;
box-shadow: 5px 2px 5px rgba(0,0,0,0.5);
}
/* Rectangle 17 */
.navbar {
position: absolute;
width: 1440px;
height: 45px;
left: 0px;
top: 979px;
background: #FFFFFF;
opacity: 0.7;
}
</style>
<div id="map"></div>
<div class="sidenav">
<a href="#">Pontos de medição</a>
<br></br>
<a href="#">Como é feita a medição?</a>
<br></br>
<a href="#">Saiba mais sobre o projeto</a>
<!-- <a href="#">Contact</a> -->
</div>
<div class="navbar">
<!-- <a href="#home" class="active">Qualidade</a> -->
<li><a>Nível de qualidade: </a>
<a>Ótimo</a>
<a>Bom</a>
<a>Médio</a>
<!-- <a>Ruim</a>
<a>Péssimo</a> -->
</li>
<!-- <a href="#contact">Contact</a> -->
</div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoibGl2ZXByb2plY3RzIiwiYSI6ImNrNWZra2RibjBncmgzcHBiMzd2amwyYm8ifQ.e5X4oBHOzSzJ-2z3zKwPyw';
var monument = [-34.959, -8.0482]
var posix = [-34.956, -8.0480];
var posix2 = [-34.940, -8.0474];
var posix3 = [-34.951, -8.0470];
var posix4 = [-34.959, -8.0467];
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
center: monument,
zoom: 16.15
});
// create the popup
// var popup = new mapboxgl.Popup({ offset: 25 }).setText(
// 'Qualidade do ar: AR MUITO BOM'
// );
/*
.setPopup(new mapboxgl.Popup({ offset: 25 }) // add popups
.setHTML('<h3>' + marker.properties.title + '</h3><p>' + marker.properties.description + '</p>'))
*/
// create DOM element for the marker
var el = document.createElement('div');
el.id = 'marker2';
var el2 = document.createElement('div');
el2.id = 'marker';
var el1 = document.createElement('div');
el1.id = 'marker3';
var el3 = document.createElement('div');
el3.id = 'marker4';
var el4 = document.createElement('div');
el4.id = 'marker5';
// create the marker
new mapboxgl.Marker(el)
.setLngLat(monument)
.setPopup(new mapboxgl.Popup({ offset: 25 }) // sets a popup on this marker
.setHTML('<h3>' + 'marker.properties.title' + '</h3><p>' + 'marker.properties.description' + '</p>')
)
.addTo(map);
new mapboxgl.Marker(el2)
.setLngLat(posix)
.setPopup(new mapboxgl.Popup({ offset: 25 }) // sets a popup on this marker
.setHTML('<h3>' + 'marker.properties.title' + '</h3><p>' + 'marker.properties.description' + '</p>')
)
.addTo(map);
new mapboxgl.Marker(el1)
.setLngLat(posix2)
.setPopup(new mapboxgl.Popup({ offset: 25 }) // sets a popup on this marker
.setHTML('<h3>' + 'marker.properties.title' + '</h3><p>' + 'marker.properties.description' + '</p>')
)
.addTo(map);
new mapboxgl.Marker(el3)
.setLngLat(posix3)
.setPopup(new mapboxgl.Popup({ offset: 25 }) // sets a popup on this marker
.setHTML('<h3>' + 'marker.properties.title' + '</h3><p>' + 'marker.properties.description' + '</p>')
)
.addTo(map);
new mapboxgl.Marker(el4)
.setLngLat(posix4)
.setPopup(new mapboxgl.Popup({ offset: 25 }) // sets a popup on this marker
.setHTML('<h3>' + 'marker.properties.title' + '</h3><p>' + 'marker.properties.description' + '</p>')
)
.addTo(map);
</script>
</body>
</html>