Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
613 lines (594 loc) · 26.7 KB
/
Copy pathindex.html
File metadata and controls
613 lines (594 loc) · 26.7 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
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>NMHikes Assistant</title>
<meta charset="utf-8" />
<meta name="description" content="Mobile app for offline maps" />
<meta name="author" content="Ken Cowles" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover,
maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="styles/home.css" />
</head>
<body>
<dialog id="notifier">
<p id="msg"></p>
<button id="ok" type="button" class="btn btn-sm btn-success">OK</button>
</dialog>
<dialog id="empty_track">
<p><em>There is nothing to save:</em></p>
<button id="yes_stop" type="button" class="btn btn-sm btn-danger">Stop Tracking</button>
<button id="dont_stop" type="button" class="btn btn-sm btn-success">Keep Tracking</button>
</dialog>
<div id="loader_gif">
<img src="images/sand.gif" />
</div>
<div id="map-container">
<div id="map"></div>
</div>
<div id="ui-overlay">
<div id="hamburger">
<img id="menu_trigger" src="images/hamburger.png" />
<span id="disp" style="display:none;">Closed</span>
</div>
<span id="version"></span>
<!-- Menu/Draw Icons -->
<div id="icon_div">
<table id="icon_tbl">
<tbody>
<tr id="row1">
<td>
<svg id="play" width="36px" height="36px" viewbox="0 0 36 36">
<circle cx="18" cy="18" r="18" fill="red" />
<polygon
points="12,11 24,18 12,25"
stroke="white"
stroke-width="1"
fill="white"
/>
</svg>
</td>
</tr>
<tr id="row2">
<td>
<svg id="pause" width="36px" height="36px" viewbox="0 0 36 36">
<circle cx="18" cy="18" r="18" fill="red" />
<rect x="12" y="12" width="3" height="12" stroke="white" fill="white" />
<rect x="21" y="12" width="3" height="12" stroke="white" fill="white" />
</svg>
</td>
</tr>
<tr id="row3">
<td>
<svg id="green_marker" xmlns="http://w3.org" viewBox="0 0 24 24" width="46" height="46">
<path fill="var(--marker-color, #006400)" d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>
<circle fill="#FFFFFF" cx="12" cy="9" r="2.5"/>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
<div id="alt-icons">
<svg id="stop" width="36px" height="36px" viewbox="0 0 36 36">
<circle cx="18" cy="18" r="18" stroke="red" stroke-width="1" fill="gray" />
<rect x="11" y="11" width="14" height="14" fill="white"/>
</svg>
<svg id="paused_stop" width="36px" height="36px" viewbox="0 0 36 36">
<circle cx="18" cy="18" r="18" stroke="red" stroke-width="1" fill="gray" />
<rect x="11" y="11" width="14" height="14" fill="white"/>
<line x1="0" y1="36" x2="36" y2="0" style="stroke:red;stroke-width:3" />
</svg>
<svg id="unpause" width="36px" height="36px" viewbox="0 0 36 36">
<circle cx="18" cy="18" r="18" stroke="red" stroke-width="1" fill="gray" />
<rect x="12" y="12" width="3" height="12" stroke="white" fill="white" />
<rect x="21" y="12" width="3" height="12" stroke="white" fill="white" />
</svg>
<div id="follow_icon" class="tap_box">
<svg width="40" height="40" viewbox="0 0 40 40">
<circle cx="20" cy="20" r="18" fill="#dfecdf" stroke="darkgreen" stroke-width="2" />
<line x1="20" y1="4" x2="20" y2="17" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="17" x2="16" y2="13" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="17" x2="24" y2="13" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="36" x2="20" y2="23" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="23" x2="16" y2="27" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="23" x2="24" y2="27" style="stroke:darkgreen;stroke-width:2" />
<line x1="4" y1="20" x2="17" y2="20" style="stroke:darkgreen;stroke-width:2" />
<line x1="17" y1="20" x2="13" y2="16" style="stroke:darkgreen;stroke-width:2" />
<line x1="17" y1="20" x2="13" y2="24" style="stroke:darkgreen;stroke-width:2" />
<line x1="36" y1="20" x2="23" y2="20" style="stroke:darkgreen;stroke-width:2" />
<line x1="23" y1="20" x2="27" y2="16" style="stroke:darkgreen;stroke-width:2" />
<line x1="23" y1="20" x2="27" y2="24" style="stroke:darkgreen;stroke-width:2" />
</svg>
</div>
<div id="unfollow_icon" class="tap_box">
<svg width="40" height="40" viewbox="0 0 40 40">
<circle cx="20" cy="20" r="18" fill="#dfecdf" stroke="darkgreen" stroke-width="2" />
<line x1="20" y1="4" x2="20" y2="17" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="17" x2="16" y2="13" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="17" x2="24" y2="13" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="36" x2="20" y2="23" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="23" x2="16" y2="27" style="stroke:darkgreen;stroke-width:2" />
<line x1="20" y1="23" x2="24" y2="27" style="stroke:darkgreen;stroke-width:2" />
<line x1="4" y1="20" x2="17" y2="20" style="stroke:darkgreen;stroke-width:2" />
<line x1="17" y1="20" x2="13" y2="16" style="stroke:darkgreen;stroke-width:2" />
<line x1="17" y1="20" x2="13" y2="24" style="stroke:darkgreen;stroke-width:2" />
<line x1="36" y1="20" x2="23" y2="20" style="stroke:darkgreen;stroke-width:2" />
<line x1="23" y1="20" x2="27" y2="16" style="stroke:darkgreen;stroke-width:2" />
<line x1="23" y1="20" x2="27" y2="24" style="stroke:darkgreen;stroke-width:2" />
<!--<text x="15" y1="15" stroke="red" fill="red" font-size="11"
transform="rotate(45 0,-5)">STOP</text>-->
<line x1="2" y1="2" x2="38" y2="38" style="stroke:red;stroke-width:4" />
</svg>
</div>
<img id="findme_icon" src="images/locate.png" />
</div>
<div id="secondary_btns"> <!-- default states -->
<button id="map_save" class="btn btn-sm btn-success" disabled>Save</button>
<button id="clear_rect" class="btn btn-sm btn-warning" disabled>Redraw</button>
<button id="rect" class="btn btn-sm btn-success" disabled>Draw</button>
<button id="exit_draw" class="btn btn-sm btn-primary">Quit</button>
</div>
<div id="info">
<span class="distance">0</span> mis,
alt: <span class="feet">0 ft </span>
<!-- Testing scrubbed geoloc points:
A: <span id="ecount1">0</span>;
B: <span id="ecount2">0</span>
-->
</div>
<!-- The Menu -->
<div id="menu-backdrop"></div>
<div id="menu">
<span class="line_override">Offline Maps</span>
<div class="surround">
<table class="menu-table">
<tr id="menu_create">
<td><img id="show_save_types" src="images/pallette.png" /></td>
<td class="tbl_txt">Create Map</td>
</tr>
<tr id="menu_offline">
<td><img id="off_goto" src="images/offline.png" /></td>
<td class="tbl_txt">Select Map</td>
</tr>
</table>
</div>
<span class="line_override">Icons</span>
<div class="surround">
<table class="menu-table">
<tr>
<td>
<label id="toggle1" class="toggle">
<input type="checkbox" id="menu-recording">
<span class="toggle-track"><span class="thumb"></span></span>
</label>
</td>
<td class="tbl_txt">Tracking</td>
</tr>
<tr>
<td>
<label id="toggle3" class="toggle">
<input type="checkbox" id="menu-location">
<span class="toggle-track"><span class="thumb"></span></span>
<span class="label-text"></span>
</label>
</td>
<td class="tbl_txt">Find Me</td>
</tr>
<tr>
<td>
<label id="toggle2" class="toggle">
<input type="checkbox" id="menu-follows">
<span class="toggle-track"><span class="thumb"></span></span>
<span class="label-text"></span>
</label>
</td>
<td class="tbl_txt">Center Map<br />on GPS</td>
</tr>
</table>
</div>
<span class="line_override">Trip Statistics</span>
<div class="surround">
<table class="menu-table">
<tr id="menu_hike_stats">
<td><img id="trip_stats" src="images/trip_data.png" /></td>
<td class="tbl_txt">Trip Data</td>
</tr>
</table>
</div>
</div>
</div>
<!-- --------------- MODALS --------------- -->
<!-- MODAL: Ways to Save -->
<div id="save_type" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Save Map for Offline</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<button id="site" class="btn btn-sm btn-primary" disabled>
Import Hike</button>
<div id="srch_box" class="ui-widget">
<style type="text/css">
ul.ui-widget {
width: 300px;
clear: both;
z-index: 9000;
}
</style>
<input id="search" class="search" placeholder="Search for a Hike" />
<button id="clear" class="btn btn-sm btn-secondary">X</button>
</div>
<br /><br />
<button id="gpx" class="btn btn-sm btn-primary" disabled>
Import GPX</button> <input id="gpxfile" type="file" />
<br /><br />
<button id="begin_draw" class="btn btn-sm btn-primary">
Draw rectangle</button>
</div>
<div class="modal-footer">
<button class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- MODAL: Draw Rectangle -->
<div id="draw_setup" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Drawing Rectangle</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Pan / zoom to level 13 or higher to display area of
interest. Then tap 'Draw' below to begin.
</div>
<div class="modal-footer">
<button id="draw_routine" class="btn btn-sm btn-success">Ready to Draw</button>
<button class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- MODAL: Marker Text -->
<div id="marker_text" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Add Marker Text</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<span id="mrkr_indx"></span>
Add popup text to this marker (10 char or less):<br /><br />
<textarea id="id_text"></textarea><br /><br />
<button id="add_marker_text" class="btn btn-sm btn-success">
Add Text
</button>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- MODAL: Offline Map Saver -->
<div id="om_save" class="modal" tabindex="-1"
aria-labelledby="Offline Map Saver" aria-hidden="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Offline Map Saver</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Map Name:
<input id="map_name" type="text" /><br /><br />
<button id="save_om" class="btn btn-success btn-sm">
Save Map</button><br /><br />
<button id="use_asis" class="btn btn-primary btn-sm">Use Online</button>
Don't save - use as is online
</div>
<div class="modal-footer">
<button class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<!-- MODAL: Tile Save Status -->
<div id="stat" class="modal" tabindex="-1"
aria-labelledby="Map Save Status" aria-hidden="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Map Tile Save Status</h5>
<button class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<span id="base">----- * Saving base map * -----</span>
<div id="preloads">
Zoom-out tiles: <span id="zot_cnt"></span><br />
Loaded:
<div id="out_progress">
<div id="out_bar"></div>
</div>
</div>
<div id="loads">
Zoom-in tiles: <span id="zin_cnt"></span><br />
Loaded:
<div id="progress">
<div id="bar"></div>
</div>
</div><br />
<p id="complete">SAVED!</p>
</div>
<div class="modal-footer">
<button class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Select a Saved Map for use offline -->
<div id="maps_available" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Select Offline Map</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="available" style="font-size: 18px;">
<span id="last_used"></span>
Select the map you wish to use offline…<br />
<div>
<select id="select_map" style="min-width:120px;">
<option value="No Maps">No Maps</option>
</select> File size: <span id="filesize"></span> MB<br /><br />
<button id="use_map" class="btn btn-sm btn-success">Use Map
</button>
<button id="delmap" class="btn btn-sm btn-danger">
Delete Map</button>
<span id="listing"></span>
</div>
</div>
<div id="no_maps" style="display:none;">
<p>
There are no offline maps saved: tap the "Save New Map" button
to create and save an offline map. Internet connection is required.
</p>
</div>
<div>
<br />
<button id="save_display" class="btn btn-sm btn-primary">
Save New Map
</button> [Internet required]
<br /><br />
<span id="batt">*** When done, completely close this app to prevent
battery drain.</span>
</div>
</div>
<div class="modal-footer">
<button id="off_close" type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- GPX Track Saver -->
<div id="save_gpx" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Save Track File</h5>
</div>
<div class="modal-body">
<div id="map2save" style="font-size: 18px;">
Enter a unique name:<br />
<input id="dwnld_name" type="text" /><br />
<div id="offline_only">
Save as an offline map:
<input id="convert" type="checkbox" /><br />
</div>
</div>
</div>
<div class="modal-footer justify-content-start" class="left-justify">
<table id="gpx_table">
<tbody>
<tr>
<td><button id="save_dwnld" class="btn btn-sm btn-success">
Save</button>
</td>
<td>
<span id="green">Clear Track</span> <input id="clear_track" type="checkbox" />
</td>
</tr>
<tr>
<td>
<button id="dont_save" class="btn btn-sm btn-danger">
Don't Save</button>
</td>
<td>
<span id="red">Keep Tracking</span> <input id="continue_track" type="checkbox" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Restore Session Data From Previous Closing -->
<div id="restore" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Restore Data</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="previous_data">
<p>When you last closed the app, there was track and/or marker
data that may have been unsaved. If you wish to restore that
data, click the 'Restore' button below, otherwise simply close this
dialog box.</p>
<p>Your last map was: <span id="usmap"></span></p>
<button id="restore_session" class="btn btn-sm btn-success">
Restore
</button><br />
</div>
</div>
<div class="modal-footer">
<button class="btn btn-sm btn-secondary" data-bs-dismiss="modal">
Ignore</button>
</div>
</div>
</div>
</div>
<!-- Multiple Tracks to Import -->
<div id="multi" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Multiple Tracks</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>This hike has multiple tracks, but only the main one will be
imported here. To import other tracks, go to the page on nmhikes.com
and click the 'Download GPX File', which will present all the tracks.
After downloading, import the downloaded file as a GPX file.
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Track Too Big -->
<div id="too_big" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Memory Limits Hit</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
We aplogize - saving the selected track would exceed our
current memory limitations. Please select another track,
or use this track online. All saved tracks must fit the map
within zoom level 13.
</p>
<button id="big_online" class="btn btn-sm btn-success">Use Online</button><br /><br />
<button id="big_kill" class="btn btn-sm btn-primary">Discard</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Saving Hybrid Tiles -->
<div id="hybrid_save" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Additional Tiles</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<span id="next_map"></span>
<span id="show_types"></span>
<p>While using the offline map <span id="offmap"></span>,
internet became available and additional tiles were temporarily
saved. The offline map consumes <span id="offsize"></span> MB, and
the temporary tiles would add <span id="add_size"></span> MB
to your file. Select your choice below.
</p>
<button id="keep_tmp" class="btn btn-sm btn-success">Keep</button><br /><br />
<button id="kill_tmp" class="btn btn-sm btn-primary">Discard</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Hiking Info -->
<div id="hiking_info" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Tracking Activity</h5>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table id="active_stats">
<tbody>
<tr>
<td>Distance</td>
<td class="break"><span class="distance">0</span> mis</td>
</tr>
<tr>
<td>Elevation</td>
<td class="break"><span class="feet">0</span> ft</tr>
</tr>
<tr>
<td>Max to Min</td>
<td class="break otherTripData" id="m2m">0</td>
</tr>
<tr>
<td>Elasped Time</td>
<td class="break otherTripData" id="etime">0</td>
</tr>
<tr>
<td>Moving Time</td>
<td class="break otherTripData" id="mtime">0</td>
</tr>
<tr>
<td>Accum ascent</td>
<td class="break otherTripData"><span id="accum_asc">0</span> ft</td>
</tr>
<tr>
<td>Accum descent</td>
<td class="break otherTripData"><span id="accum_dsc">0</span> ft</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary"
data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="dist/home.bundle.js"></script>
</body>
</html>