-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreconciliation.html
208 lines (169 loc) · 7.73 KB
/
reconciliation.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
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Stops Reconciliation - Payanam</title>
<link href="lib/leaflet.css" orig="https://unpkg.com/[email protected]/dist/leaflet.css" rel="stylesheet">
<link href="lib/jquery-ui.css" rel="stylesheet">
<link href="lib/tabulator.min.css" rel="stylesheet">
<link href="lib/bootstrap.v4.0.0.min.css" crossorigin="anonymous" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" rel="stylesheet">
<link rel="stylesheet" href="lib/easy-button.css" alt="https://cdn.jsdelivr.net/npm/leaflet-easybutton@2/src/easy-button.css">
<link rel="stylesheet" href="lib/chosen/chosen.min.css">
<link href='lib/leaflet.fullscreen.css' alt='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' rel='stylesheet' />
<link href="js/style.css" rel="stylesheet">
<!-- Put the CSSs first and JSs next -->
<script src="lib/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="lib/jquery-ui.min.js" type="text/javascript"></script>
<script src="lib/leaflet.js"></script>
<script src="lib/easy-button.js" alt="https://cdn.jsdelivr.net/npm/leaflet-easybutton@2/src/easy-button.js"></script>
<script src="lib/tabulator.min.js" type="text/javascript"></script>
<script src="lib/popper.v1.12.9.min.js" crossorigin="anonymous" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" alt="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="lib/bootstrap.v4.0.0.min.js" crossorigin="anonymous" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="lib/papaparse.min.js" type="text/javascript"></script>
<script src="lib/leaflet-ant-path.js"></script>
<script src="lib/chosen/chosen.jquery.min.js" type="text/javascript"></script>
<script src='lib/Leaflet.fullscreen.min.js' alt='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js'></script>
<script src="lib/leaflet-lasso.min.js"></script>
<script src="lib/Leaflet.Control.Custom.js"></script>
<script src="lib/leaflet-providers.js"></script>
<script src="lib/leaflet-hash.min.js"></script>
<style>
#map {
height: 85vh;
width: 100%;
min-width: 500px;
}
/* MAP */
#mapContainer {
position: relative;
}
#panel {
position: absolute;
bottom:25px;
left:10px;
/*right: 50px;*/
z-index: 1000;
padding: 10px;
border-radius: 5px;
background-color: rgba(255,255,255,0.7);
box-shadow:0px 0px 5px black; /*looks 3D! no need of a border*/
font-size: 0.7em;
}
input[type=checkbox] {
width: 15px; height: 15px;
/*-webkit-border-radius: 22px; -moz-border-radius: 22px; border-radius: 22px;*/
border: 1px solid #000;
vertical-align: middle;
}
textarea {
font-family: 'Courier New', Courier, monospace;
font-size: 80%;
}
.confidence-style {
font-size: 12px;
}
.divOnMap1 {
padding: 2px;
background: rgba(255, 255, 255, 0.644);
font-size: 14px;
}
.divOnMap2 {
padding: 2px;
background: rgba(255, 255, 255, 0.644);
font-size: 12px;
}
</style>
</head>
<body>
<div id="topMenu"></div>
<div class="container-fluid">
<div class="row">
<div class="col-md-6"><!-- left side begin -->
<p><b>Unique Stop Names</b>
<a class="badge badge-secondary" data-toggle="collapse" href="#collapse_uniqueStopsTable" role="button" aria-expanded="false" aria-controls="collapse_uniqueStopsTable">Show/Hide Table</a>
<span class="alert alert-warning">Reconciling: <select id="chooseMode">
<option value="mapped">mapped</option>
<option value="unmapped">unmapped</option>
<option value="all">all</option>
</select> stops.</span>
</p>
<div class="collapse show" id="collapse_uniqueStopsTable">
<div id="uniqueStopsTable"></div>
<p><small>
<span id="uniqueSelectStatus">0</span> unique stop names chosen. |
<button onclick="clearSelections()">Clear selections above</button> |
<button onclick="uniqueStopsTable.clearFilter(true)">Clear filters above</button>
</small></p>
</div>
<p>
<b>Individual stops</b>
<a class="badge badge-secondary" data-toggle="collapse" href="#collapse_stopsTable" role="button" aria-expanded="false" aria-controls="collapse_stopsTable">Show/Hide Table</a>
</p>
<div class="collapse show" id="collapse_stopsTable">
<p><small>
<span class="stopSelectStatus">0</span> stops chosen. |
<button onclick="stopsSelectAll()">Select All</button> |
<button onclick="clearSelections('stops')">De-select All</button> |
<button onclick="stopsTable.clearFilter(true)">Clear All Filters</button>
| <button onclick="mapStops()">Map Stops</button>
</small></p>
<div id="stopsTable"></div>
</div><!-- stops table collapse block over-->
</div><!-- left side over-->
<div class="col-md-6"><!-- right side begin -->
<div class="row"> <!-- making another columns set just for putting the RESET button on far right-->
<div class="col-md-9">
<small>open in:
<big><a href="javascript:{}" onclick="openExternalMap('g')" class="badge badge-primary">Gmaps</a>
<a href="javascript:{}" onclick="openExternalMap('m')" class="badge badge-primary">Mapillary</a>
<a href="javascript:{}" onclick="openExternalMap('p')" class="badge badge-primary">Pic4carto</a>
</big>
</small>
</div>
<div class="col-md-3">
<button class="btn btn-sm btn-danger" onclick="resetEverything()">Reset Everything!</button>
</div>
</div>
<div id="mapContainer">
<div id="map"></div>
</div>
<!-- moved to leaflet custom control, see js/reconciliation.js
<p>Preview route line: <select id="routeLineSelect"><option value="">Pick a route</option></select></p>
-->
<br><b>Stops Reconcillation </b>
<a class="badge badge-secondary" data-toggle="collapse" href="#collapse_recon" role="button" aria-expanded="false" aria-controls="collapse_recon">Show/Hide</a>
<br>
<div id="collapse_recon" class="collapse show">
<div class="row">
<div class="col-md-5">
Standardise <span class="stopSelectStatus">0</span> stops to:<br>
<p>Name: <small><a href="javascript:;" onclick="pickFirst('name')">pick first</a></small><br>
<input id="recon_stop_name" class="form-control"></p>
Lat,Lon: <small><i>click on map</i> or <a href="javascript:;" onclick="pickFirst()">pick first</a></small><br>
<p><input id="recon_loc" class="form-control"> </p>
Description: <small><i>optional</i></small><br>
<input id="recon_stop_desc" class="form-control">
</div>
<div class="col-md-7">
<textarea id="reconcillationPreview" style="width:100%;height:200px;" disabled></textarea>
<p><button onclick="reconcileSubmit()" class="btn btn-warning" data-toggle="tooltip" data-placement="bottom" title="">Reconcile Stops</button></p>
</div>
</div>
<small><div id="reconcileStatus"><p class="alert alert-warning">Note: This will go into each of the mentioned routes, and overwrite that particular stop with the standardized values. <br><br>Changes made will take about 10-15 minues to reflect here through the reporting scripts, so please don't work on the same stop names again right afterwards.</p></div></small>
</div>
</div><!-- right side over-->
</div><!-- row over-->
<br>
<p>Mapillary full view:
<a class="badge badge-secondary" data-toggle="collapse" href="#collapseMapillary" role="button" aria-expanded="false" aria-controls="collapseMapillary">Show/Hide</a>
</p>
<div class="collapse hide" id="collapseMapillary">
<iframe id="mapillary" height="400" style="width:100%;"></iframe>
</div>
<p id="keyStatus"></p>
</div> <!-- End of container-fluid-->
<!-- END HTML. BEGIN SCRIPT-->
<script src="js/common.js"></script>
<script src="js/reconciliation.js"></script>
</body>
</html>