-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lab_4.3.html
365 lines (332 loc) · 16.4 KB
/
Lab_4.3.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
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html>
<head>
<!--
Thank you templatemo.com for an amazing foundation for my website. This is the Highway Template found here: https://templatemo.com/tm-520-highway
-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--DESCRIPTION ON BROWSER TAB - LOGO?-->
<title>T GIS 503: Lab 5</title>
<!-- BEGINS ALL THINGS FONT & STYLE-->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/templatemo-style.css">
<link rel="stylesheet" href="css/light-box.css">
<link rel="stylesheet" href="css/style.css">
<!-- fontAwesome Kit -->
<script src="https://kit.fontawesome.com/f198f69782.js" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Kanit:100,200,300,400,500,600,700,800,900" rel="stylesheet">
<!--fontAwesome Loadtime-->
<script type="text/javascript"> (function() { var css = document.createElement('link'); css.href = 'https://use.fontawesome.com/releases/v5.1.0/css/all.css'; css.rel = 'stylesheet'; css.type = 'text/css'; document.getElementsByTagName('head')[0].appendChild(css); })(); </script>
<!--END ALL THINGS FONT & STYLE-->
<script src="js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!--BEGIN Leaflet CSS & Script-->
<link rel="stylesheet" href="leaflet/leaflet.css" />
<script src="leaflet/leaflet.js"></script>
<!--END Leaflet CSS & Script-->
<script src='https://api.mapbox.com/mapbox-gl-js/v1.4.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.4.1/mapbox-gl.css' rel='stylesheet' />
</head>
<body>
<nav>
<div class="logo">
<a href="index.html">Isaac <em>V</em></a>
</div>
<div class="menu-icon">
<span></span>
</div>
</nav>
<section class="overlay-menu">
<div class="container">
<div class="row">
<div class="main-menu">
<ul>
<li>
<a href="index.html">Main</a>
</li>
<li>
<a href="grid.html">Work</a>
</li>
<li>
<a href="about.html">About Me</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<div class="page-heading">
<div class="container">
<div class="heading-content">
<h1>T GIS <em>503</em></h1>
</div>
</div>
</div>
<div class="blog-entries">
<div class="container">
<div class="col-md-9">
<div class="blog-posts">
<div class="row">
<div class="col-md-12">
<div class="single-blog-post">
<div class="text-content">
<h2>Lab 5</h2>
<span><a href="#">10 December 2019</a></span>
<p>
<style>
.filter-ctrl {
position: absolute;
top: 10px;
right: 10px;
z-index: 1;
width: 180px;
}
.filter-ctrl input[type=text] {
font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
width: 100%;
border: 0;
background-color: #fff;
height: 40px;
margin: 0;
color: rgba(0,0,0,.5);
padding: 10px;
box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
border-radius: 3px;
}
</style>
<div id='map'>
<div class='filter-ctrl'>
<input id='filter-input' type='text' name='filter' placeholder='Filter by name' />
</div></div>
</div>
</div>
</div>
</div>
<!-- <nav id="layerToggleMenu"></nav> -->
<div id="map"></div>
<!-- based on Filter symbols by text input documentation https://docs.mapbox.com/mapbox-gl-js/example/filter-markers-by-input/ -->
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiaXNhYWN2IiwiYSI6ImNrMnpqYnVxaTA1b3IzbXBnaG5zY3o3eTEifQ.kMdIcXYBFKHTorj3Hxgi7g';
var places = {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"icon": "theatre"
},
"geometry": {
"type": "Point",
"coordinates": [-77.038659, 38.931567]
}
}, {
"type": "Feature",
"properties": {
"icon": "theatre"
},
"geometry": {
"type": "Point",
"coordinates": [-77.003168, 38.894651]
}
}, {
"type": "Feature",
"properties": {
"icon": "bar"
},
"geometry": {
"type": "Point",
"coordinates": [-77.090372, 38.881189]
}
}, {
"type": "Feature",
"properties": {
"icon": "bicycle"
},
"geometry": {
"type": "Point",
"coordinates": [-77.052477, 38.943951]
}
}, {
"type": "Feature",
"properties": {
"icon": "music"
},
"geometry": {
"type": "Point",
"coordinates": [-77.031706, 38.914581]
}
}, {
"type": "Feature",
"properties": {
"icon": "music"
},
"geometry": {
"type": "Point",
"coordinates": [-77.020945, 38.878241]
}
}, {
"type": "Feature",
"properties": {
"icon": "music"
},
"geometry": {
"type": "Point",
"coordinates": [-77.007481, 38.876516]
}
}]
};
var layerIDs = []; // Will contain a list used to filter against.
var filterInput = document.getElementById('filter-input');
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
center: [-77.04, 38.907],
zoom: 11.15
});
map.on('load', function() {
// Add a GeoJSON source containing place coordinates and information.
map.addSource('places', {
"type": "geojson",
"data": places
});
places.features.forEach(function(feature) {
var symbol = feature.properties['icon'];
var layerID = 'poi-' + symbol;
// Add a layer for this symbol type if it hasn't been added already.
if (!map.getLayer(layerID)) {
map.addLayer({
"id": layerID,
"type": "symbol",
"source": "places",
"layout": {
"icon-image": symbol + "-15",
"icon-allow-overlap": true,
"text-field": symbol,
"text-font": ["Open Sans Bold", "Arial Unicode MS Bold"],
"text-size": 11,
"text-transform": "uppercase",
"text-letter-spacing": 0.05,
"text-offset": [0, 1.5]
},
"paint": {
"text-color": "#202",
"text-halo-color": "#fff",
"text-halo-width": 2
},
"filter": ["==", "icon", symbol]
});
layerIDs.push(layerID);
}
});
filterInput.addEventListener('keyup', function(e) {
// If the input value matches a layerID set
// it's visibility to 'visible' or else hide it.
var value = e.target.value.trim().toLowerCase();
layerIDs.forEach(function(layerID) {
map.setLayoutProperty(layerID, 'visibility',
layerID.indexOf(value) > -1 ? 'visible' : 'none');
});
});
});
</script>
</p>
<div class="tags-share">
<div class="row">
<div class="col-md-6">
<ul class="tags">
<li>Tags:</li>
<li><a href="#">maps</a>,</li>
<li><a href="#">GIS</a>,</li>
<li><a href="#">Mapbox GL</a></li>
</ul>
</div>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--BEGINS "CONTACT" pop-up button - BOTTOM RIGHT-->
<div class="popup-icon">
<button id="modBtn" class="modal-btn"><img src="img/contact-icon.png" alt=""></button>
</div>
<!-- Modal -->
<div id="modal" class="modal">
<!-- Modal Content -->
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h3 class="header-title">Contact <em>Isaac</em></h3>
<div class="close-btn"><img src="img/close_contact.png" alt=""></div>
</div>
<!-- Modal Body -->
<div class="modal-body">
<div class="col-md-6 col-md-offset-3">
<form id="contact" action="" method="post">
<div class="row">
<div class="col-md-12">
<fieldset>
<input name="name" type="text" class="form-control" id="name" placeholder="Your name..." required="">
</fieldset>
</div>
<div class="col-md-12">
<fieldset>
<input name="email" type="email" class="form-control" id="email" placeholder="Your email..." required="">
</fieldset>
</div>
<div class="col-md-12">
<fieldset>
<textarea name="message" rows="6" class="form-control" id="message" placeholder="Your message..." required=""></textarea>
</fieldset>
</div>
<div class="col-md-12">
<fieldset>
<button type="submit" id="form-submit" class="btn">Send Message Now</button>
</fieldset>
</div>
<div id="social">
</br>
</br>
<p> Form Under Construction </p>
<a href="https://www.linkedin.com/in/isaac-vanmechelen/" class="fab fa-linkedin-in fa-2x" target="_blank"></a>
<a href="https://www.facebook.com/IsaacV.Photography/" class="fab fa-facebook-f fa-2x" target="_blank"></a>
<a href="https://www.behance.net/vanmeciv" class="fab fa-behance fa-2x" target="_blank"></a>
<a href="https://github.com/vanmeciv" class="fab fa-github fa-2x" target="_blank"></a>
<a href="https://msgtcohort.slack.com" class="fab fa-slack-hash fa-2x" target="_blank"></a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!--ENDS "CONTACT" pop-up button - BOTTOM RIGHT-->
<!--BEGINS FOOTER-->
<footer>
<div class="container-fluid">
<div class="col-md-12">
<p>| © 2019 | Designed by
<a href="https://templatemo.com/tm-520-highway" target="_blank">TemplateMo</a>
|</br>| Cloned by Isaac Van Mechelen
<a href="img/Isaac_Van_Mechelen's_Resume.pdf" class="far fa-file-pdf fa-2x" target="_blank" style="margin: .25em; text-decoration: none; color: #fff;">
</a>|
</p>
</div>
</div>
</footer>
<!--ENDS FOOTER-->
</body>
</html>