-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
83 lines (72 loc) · 3.15 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Edits visualiser</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link href='https://www.mapbox.com/base/latest/base.css' rel='stylesheet' />
<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.css' rel='stylesheet' />
<link rel="stylesheet" type="text/css" href="css/app.css">
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v2.2.0/mapbox-gl-geocoder.min.js'></script>
<link rel='stylesheet' href='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v2.2.0/mapbox-gl-geocoder.css' type='text/css' />
<script>
window.onload = function () {
let url = 'https://tasks.hotosm.org/api/v1/project/search'
$.ajax(url)
.done(function (data) {
let select = document.getElementById('projects')
data.mapResults.features.forEach(function (project) {
let option = document.createElement('option')
option.text = option.value = project.properties.projectId
select.add(option, 0)
})
})
.fail(function () {
})
}
</script>
</head>
<body>
<div class='queries col4 pad2 '>
<div id='desc' class='prose prose-big quiet space-bottom4 '>
<p>
Hi there! Zoom in to your area of interest & pick a time slot from the dropdown here. Hit `Fetch Data` to see all the Edits in the area within your chosen timeframe!
</p>
</div>
<div class='note warning col11 pad1x' style='display:none'>
<p></p>
</div>
<form id='QueryForm'>
<fieldset class = 'col6'>
<select id='projects' name="projects">
<option value="0">HOTOSM Projects</option>
</select>
</fieldset>
<fieldset class='col6'>
<label>From</label>
<input id='fromdate' type='datetime-local' placeholder='yyyy-MM-dd' />
</fieldset>
</br>
<fieldset class='col6'>
<label>To</label>
<input id='todate' type='datetime-local' placeholder='yyyy-MM-dd' />
</fieldset>
<div class='col6'>
<div class='loading fill-gray' style='display:none'></div>
<a href='#' id='submit' class='button'>Fetch Data</a>
</div>
</form>
</div>
<div id='count' class="col4 pad2 prose prose-big"></div>
<div id="menu" class="bottom-right"></div>
<div id='map'></div>
<div id='map-legend' class='legend'>
<div id='node'><span style='background-color: #8C5E58'></span>Nodes</div>
<div id='way'><span style='background-color: #FF7E6B'></span>Ways</div>
<div id='relations'><span style='background-color: #F6E27F'></span>Relations</div>
</div>
<script src="dist/bundle.js"></script>
</body>
</html>