-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebGIS.html
398 lines (372 loc) · 22 KB
/
WebGIS.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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web GIS</title>
<link rel="stylesheet" href="css/webgis.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/fontgis.min.css">
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
</head>
<body>
<div class="container-fluid">
<div class="row flex-nowrap">
<div class="col-auto col-md-4 col-xl-3 px-sm-2 px-0 bg-light">
<div class="d-flex flex-column align-items-center align-items-sm-start pt-2 text-dark min-vh-100">
<button id="btnAddExternalDataset" type="button" class="btn btn-primary mb-3" data-bs-toggle="modal"
data-bs-target="#divExternalDatasetPanel"><svg xmlns="http://www.w3.org/2000/svg" width="22"
height="22" fill="currentColor" class="bi bi-plus-square" viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
<path
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4" />
</svg> Add Dataset</button>
<div id="divDatasetsParent" class="container-fluid bg-info bg-opacity-10 my-1">
<h5>Datasets:</h5>
<div id="divDatasets"
class="container-fluid justify-content-center align-items-center bg-info bg-opacity-10 p-3 ">
</div>
</div>
<button id="btnCreateWorkflow" type="button" class="btn btn-primary my-3" data-bs-toggle="modal"
data-bs-target="#divWorkflowPanel"><svg xmlns="http://www.w3.org/2000/svg" width="22"
height="22" fill="currentColor" class="bi bi-plus-square" viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
<path
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4" />
</svg> Create Workflow</button>
<div id="divWorkflowsParent" class="container-fluid bg-warning bg-opacity-10 p-3 my-1">
<h5>Workflows:</h5>
<div id="divWorkflows"
class="container-fluid justify-content-center align-items-center bg-warning bg-opacity-10 p-3 ">
</div>
</div>
<h5>Query SQL:</h5>
<div id="divQueryInfo" class="p-3 text-break">
</div>
</div>
</div>
<div class="col py-3">
<!-- <h5>Dataset Preview</h5>
<div id="divDatasetPreview"
class="container-fluid justify-content-center align-items-center bg-light p-3 mt-1"></div> -->
<!-- GENERIC TOAST ALERT - BEGIN -->
<div id="divToastContainer" class="toast-container fixed-top" id="toastContainer">
<div id="divToastAlert" class="toast align-items-center text-white bg-primary border-0" role="alert"
aria-live="assertive" aria-atomic="true">
<div class="d-flex">
<div id="divToastText" class="toast-body">
Hello, world! This is a toast message.
</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"
aria-label="Close"></button>
</div>
</div>
</div>
<!-- GENERIC TOAST ALERT - END -->
<!-- <h5>Code Blocks</h5> -->
<div class="expandable-panel">
<div class="panel-header"><i class="bi bi-arrows-collapse"></i> <span>Click to collapse</span></div>
<div class="panel-content">
<div id="topPanel">
<div id="divMainBlocklyWorkspace" class="blockly-workspace"
class="container-fluid justify-content-center align-items-center h-25 p-3 bg-light my-1">
</div>
<div id="divQueryPanel"
class="container-fluid d-flex justify-content-center align-items-center bg-light p-3 my-1 gap-3">
<!-- <div class="dropdown">
<button id="btnSelectQuery" class="btn btn-secondary dropdown-toggle" type="button"
id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
Select Query
</button>
<ul id="queryDDL" class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
</ul>
</div> -->
<button id="btnExecuteBlock" type="button" class="btn btn-primary">Execute Block(s)
Code</button>
<button id="btnDisplayBlockDatasetModal" type="button" class="btn btn-primary"
data-bs-toggle="modal" data-bs-target="#divBlockDatasetPanel">Save Block(s) as
Dataset</button>
<button id="btnSaveBlockWorkflowStep" type="button" class="btn btn-primary d-none"
data-bs-toggle="modal" data-bs-target="#divWorkflowStepPanel">Save Block(s) as
Workflow Step</button>
<!-- <button id="btnSaveWorkflowStepEdits" type="button" class="btn btn-primary d-none">Save
Workflow Step Edits</button> -->
<div id="divLoadingIcon" class="spinner-border text-primary d-none" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
</div>
</div>
</div>
<div class="d-flex justify-content-center align-items-center">
<div class="d-flex flex1"><!--spacer --></div>
<div id="tgBtnMapTable" class="btn-group d-flex flex1 justify-content-center my-2 shadow"
style="max-width: 180px;" role="group">
<input id="radBtnResultsMap" type="radio" class="btn-check" rel="js-VizMapTableToggle"
name="vizMapTableToggle" checked />
<label class="btn btn-outline-primary" for="radBtnResultsMap"><i class="bi bi-map"></i>
Map</label>
<input id="radBtnResultsDataTable" type="radio" class="btn-check" rel="js-VizMapTableToggle"
name="vizMapTableToggle" />
<label class="btn btn-outline-primary" for="radBtnResultsDataTable"><i class="bi bi-table"></i>
Table</label>
</div>
<div class="d-flex flex1 justify-content-end">
<button id="btnClearResults" type="button" class="btn btn-primary">Clear Results</button>
</div>
</div>
<div id="results_map" class="da-map flex-grow-1 w-100 mx-auto"></div>
<div id="results_table" class="flex-grow-1 w-100 mx-auto d-none"></div>
</div>
</div>
</div>
<!-- EXTERNAL DATASET MODAL - BEGIN -->
<div class="modal fade" id="divExternalDatasetPanel" tabindex="-1" aria-label="add dataset" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title h5">
Dataset
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<label for="externalDatasetURL" class="form-label">(e.g.
http(s)://data.mydomain.nyc_streets.parquet)
</label>
<div class="input-group mb-4">
<span class="input-group-text">Dataset URL</span>
<input id="externalDatasetURL" type="text" aria-label="dataset URL" class="form-control">
</div>
<label for="externalDatasetName" class="form-label">(e.g. nyc_subway_stations)</label>
<div class="input-group mb-4">
<span class="input-group-text">Dataset Name</span>
<input id="externalDatasetName" type="text" aria-label="dataset name" class="form-control">
</div>
<label for="externalDatasetCRS" class="form-label">(e.g. EPSG:4326)</label>
<div class="input-group mb-4">
<span class="input-group-text">Coordinate Reference System (CRS)</span>
<input id="externalDatasetCRS" type="text" aria-label="coordiante reference system"
class="form-control">
</div>
<label for="externalDatasetDescription" class="form-label">(brief description of the
dataset)</label>
<div class="input-group">
<span class="input-group-text">Description</span>
<textarea id="externalDatasetDescription" rows="4" cols="50" aria-label="dataset description"
class="form-control"></textarea>
</div>
</div>
<div class="modal-footer">
<button id="btnSaveExternalDataset" type="button" class="btn btn-primary">Save</button>
<button id="btnCancelDataset" type="button" class="btn btn-secondary" data-bs-dismiss="modal">
Cancel
</button>
</div>
</div>
</div>
</div>
<!-- EXTERNAL DATASET MODAL - END -->
<!-- BLOCK DATASET MODAL - BEGIN -->
<div class="modal fade" id="divBlockDatasetPanel" tabindex="-1" aria-label="add dataset" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title h5">
Dataset
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<label for="blockDatasetName" class="form-label">(e.g. nyc_subway_stations)</label>
<div class="input-group mb-4">
<span class="input-group-text">Dataset Name</span>
<input id="blockDatasetName" type="text" aria-label="dataset name" class="form-control">
</div>
<!-- <label for="blockDatasetCRS" class="form-label">(e.g. EPSG:4326)</label>
<div class="input-group mb-4">
<span class="input-group-text">Coordinate Reference System (CRS)</span>
<input id="blockDatasetCRS" type="text" aria-label="coordiante reference system"
class="form-control">
</div> -->
<label for="blockDatasetDescription" class="form-label">(brief description of the
dataset)</label>
<div class="input-group">
<span class="input-group-text">Description</span>
<textarea id="blockDatasetDescription" rows="4" cols="50" aria-label="dataset description"
class="form-control"></textarea>
</div>
</div>
<div class="modal-footer">
<button id="btnSaveBlockDataset" type="button" class="btn btn-primary">Save</button>
<button id="btnCancelBlockDataset" type="button" class="btn btn-secondary" data-bs-dismiss="modal">
Cancel
</button>
</div>
</div>
</div>
</div>
<!-- BLOCK DATASET MODAL - END -->
<!-- WORKFLOW ITEM MODAL - BEGIN -->
<div class="modal fade" id="divWorkflowPanel" tabindex="-1" aria-label="create workflow" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title h5">
Workflow
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<label for="workFlowName" class="form-label">(e.g. taxi trip analysis)</label>
<div class="input-group">
<span class="input-group-text">Workflow Name</span>
<input id="workFlowName" type="text" aria-label="workflow name" class="form-control">
</div>
<label for="workFlowDescription" class="form-label">(brief description of the
workflow)</label>
<div class="input-group">
<span class="input-group-text">Description</span>
<textarea id="workFlowDescription" rows="4" cols="50" aria-label="workflow description"
class="form-control"></textarea>
</div>
</div>
<div class="modal-footer">
<button id="btnSaveWorkflow" type="button" class="btn btn-primary">Save</button>
<button id="btnCancelWorkflow" type="button" class="btn btn-secondary" data-bs-dismiss="modal">
Cancel
</button>
</div>
</div>
</div>
</div>
<!-- WORKFLOW ITEM MODAL - END -->
<!-- WORKFLOW STEP MODAL - BEGIN -->
<div class="modal fade" id="divWorkflowStepPanel" tabindex="-1" aria-label="add workflow step" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title h5">
Workflow Step
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<label for="workflowStepName" class="form-label">(e.g. create classification)</label>
<div class="input-group">
<span class="input-group-text">Workflow Step Name</span>
<input id="workflowStepName" type="text" aria-label="workflow step name" class="form-control">
</div>
<label for="workflowStepDescription" class="form-label">(brief description of the workflow
step)</label>
<div class="input-group">
<span class="input-group-text">Description</span>
<textarea id="workflowStepDescription" rows="4" cols="50" aria-label="workflow step description"
class="form-control"></textarea>
</div>
</div>
<div class="modal-footer">
<button id="btnSaveWorkflowStep" type="button" class="btn btn-primary">Save</button>
<button id="btnCancelWorkflowStep" type="button" class="btn btn-secondary" data-bs-dismiss="modal">
Cancel
</button>
</div>
</div>
</div>
</div>
<!-- WORKFLOW STEP MODAL - END -->
<!-- DATASET PREVIEW MODAL - BEGIN-->
<div class="modal fade" id="divDatasetPreviewPanel" tabindex="-1" aria-label="add dataset" aria-hidden="true">
<div class="modal-dialog modal-fullscreen modal-dialog-scrollable ">
<div class="modal-content">
<div class="modal-header bg-success p-2 me-3 bg-opacity-10">
<p class="modal-title h5">
Dataset Preview
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="divDatasetInfo"></div>
<div id="divDatasetPreview"
class="d-flex flex-column justify-content-center align-items-center bg-light px-3 py-1">
<div id="tgBtnPreviewMapTable" class="btn-group d-flex flex1 justify-content-center my-2 shadow"
style="max-width: 180px;" role="group">
<input id="radBtnPreviewMap" type="radio" class="btn-check"
rel="js-VizPreviewMapTableToggle" name="vizPreviewMapTableToggle" />
<label class="btn btn-outline-primary" for="radBtnPreviewMap"><i class="bi bi-map"></i>
Map</label>
<input id="radBtnPreviewDataTable" type="radio" class="btn-check"
rel="js-VizPreviewMapTableToggle" name="vizPreviewMapTableToggle" checked />
<label class="btn btn-outline-primary" for="radBtnPreviewDataTable"><i
class="bi bi-table"></i>
Table</label>
</div>
<div id="preview_map" class="flex-grow-1 w-100 mx-auto"></div>
<div id="preview_table" class="flex-grow-1 w-100 mx-auto d-none"></div>
<div id="preview_mapTooltip"></div>
</div>
</div>
<div class="modal-footer">
<button id="btnCloseDatasetPreview" type="button" class="btn btn-secondary" data-bs-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<!-- DATASET PREVIEW MODAL - END-->
<!-- WORKFLOW PREVIEW MODAL - BEGIN -->
<div class="modal fade" id="divWorkflowPreviewPanel" tabindex="-1" aria-label="workflow preview" aria-hidden="true">
<div class="modal-dialog modal-fullscreen modal-dialog-scrollable ">
<div class="modal-content">
<div class="modal-header bg-primary p-2 bg-opacity-10">
<p class="modal-title h5">
Workflow Preview
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div
class="modal-body container-fluid d-flex justify-content-center align-items-center h-50 p-3 bg-light my-1">
<div id="divWorkflowPreviewContent"
class="flex-grow-1 d-flex flex-column justify-content-center align-items-center">
</div>
</div>
<div class="modal-footer">
<button id="btnCloseWorkflowPreview" type="button" class="btn btn-secondary"
data-bs-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<!-- WORKFLOW PREVIEW MODAL - END -->
<!-- GENERIC ALERT MODAL BEGIN -->
<div class="modal fade" id="divGenericaModal" tabindex="-1" aria-label="message" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<p class="modal-title h5">
Alert
</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p id="pAlertText"></p>
</div>
<div class="modal-footer">
<button id="btnOK" type="button" class="btn btn-secondary" data-bs-dismiss="modal">
OK
</button>
</div>
</div>
</div>
</div>
<div id="mapTooltip"></div>
<!-- GENERIC ALERT MODAL END -->
<script async src="scripts/webgis_entryapp.js"></script>
</body>
</html>