forked from wp-plugins/wp-gpx-maps
-
Notifications
You must be signed in to change notification settings - Fork 32
/
wp-gpx-maps-admin-settings.php
833 lines (745 loc) · 28.6 KB
/
wp-gpx-maps-admin-settings.php
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
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
<?php
/**
* Settings Tab
*
* Contains all settings for the output.
*
* @package WP GPX Maps
*/
if ( ! current_user_can( 'manage_options' ) )
return;
/* General */
$distanceType = get_option( 'wpgpxmaps_distance_type' );
$skipcache = get_option( 'wpgpxmaps_skipcache' );
$download = get_option( 'wpgpxmaps_download' );
$usegpsposition = get_option( 'wpgpxmaps_usegpsposition' );
/* Print Summary Table */
$summary = get_option( 'wpgpxmaps_summary' );
$tot_len = get_option( 'wpgpxmaps_summary_tot_len' );
$max_ele = get_option( 'wpgpxmaps_summary_max_ele' );
$min_ele = get_option( 'wpgpxmaps_summary_min_ele' );
$total_ele_up = get_option( 'wpgpxmaps_summary_total_ele_up' );
$total_ele_down = get_option( 'wpgpxmaps_summary_total_ele_down' );
$avg_speed = get_option( 'wpgpxmaps_summary_avg_speed' );
$avg_cad = get_option( 'wpgpxmaps_summary_avg_cad' );
$avg_hr = get_option( 'wpgpxmaps_summary_avg_hr' );
$avg_temp = get_option( 'wpgpxmaps_summary_avg_temp' );
$total_time = get_option( 'wpgpxmaps_summary_total_time' );
/* Map */
$t = get_option( 'wpgpxmaps_map_type' );
$zoomonscrollwheel = get_option( 'wpgpxmaps_zoomonscrollwheel' );
$showW = get_option( 'wpgpxmaps_show_waypoint' );
/* Diagram */
$showEle = get_option( 'wpgpxmaps_show_elevation' );
$uom = get_option( 'wpgpxmaps_unit_of_measure' );
$showSpeed = get_option( 'wpgpxmaps_show_speed' );
$uomSpeed = get_option( 'wpgpxmaps_unit_of_measure_speed' );
$showHr = get_option( 'wpgpxmaps_show_hr' );
$showAtemp = get_option( 'wpgpxmaps_show_atemp' );
$showCad = get_option( 'wpgpxmaps_show_cadence' );
$showGrade = get_option( 'wpgpxmaps_show_grade' );
/* Advanced */
$po = get_option( 'wpgpxmaps_pointsoffset' );
$donotreducegpx = get_option( 'wpgpxmaps_donotreducegpx' );
if ( empty( $showEle ) )
$showEle = 'true';
if ( ! ( $t ) )
$t = 'HYBRID';
if ( ! ( $po ) )
$po = 10;
?>
<!-- The First Div (for body) starts in wp-gpx-admin.php -->
<div class="wpgpxmaps-container-tab-settings">
<form method="post" action="options.php">
<?php wp_nonce_field( 'update-options' ); ?>
<h3 class="title">
<?php esc_html_e( 'General', 'wp-gpx-maps' ); ?>
</h3>
<table class="form-table">
<tr>
<th scope="row">
<?php esc_html_e( 'Map width:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_width" type="text" id="wpgpxmaps_width" value="<?php echo get_option( 'wpgpxmaps_width' ); ?>" style="width:50px;" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Map height:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_height" type="text" id="wpgpxmaps_height" value="<?php echo get_option( 'wpgpxmaps_height' ); ?>" style="width:50px;" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Graph height:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_height" type="text" id="wpgpxmaps_graph_height" value="<?php echo get_option( 'wpgpxmaps_graph_height' ); ?>" style="width:50px;" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Distance type:', 'wp-gpx-maps' ); ?>
</th>
<td>
<select name='wpgpxmaps_distance_type'>
<option value="0" <?php if ( '0' == $distanceType || '' == $distanceType ) echo 'selected'; ?>>
<?php esc_html_e( 'Normal (default)', 'wp-gpx-maps' ); ?>
</option>
<option value="1" <?php if ( '1' == $distanceType ) echo 'selected'; ?>>
<?php esc_html_e( 'Flat → (Only flat distance, don’t take care of altitude)', 'wp-gpx-maps' ); ?>
</option>
<option value="2" <?php if ( '2' == $distanceType ) echo 'selected'; ?>>
<?php esc_html_e( 'Climb ↑ (Only climb distance)', 'wp-gpx-maps' ); ?>
</option>
</select>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Cache:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_skipcache" type="checkbox" value="true" <?php if ( true == $skipcache ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Do not use cache', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'GPX Download:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_download" type="checkbox" value="true" <?php if ( true == $download ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Allow users to download your GPX file', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Use browser GPS position:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_usegpsposition" type="checkbox" value="true" <?php if ( true == $usegpsposition ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Allow users to use browser GPS in order to display their current position on map', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Thunderforest API Key (Open Cycle Map):', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_openstreetmap_apikey" type="text" id="wpgpxmaps_openstreetmap_apikey" value="<?php echo get_option( 'wpgpxmaps_openstreetmap_apikey' ); ?>" style="width:400px" />
<em>
<a href="'http://www.thunderforest.com/docs/apikeys/" target="_blank" rel="noopener noreferrer">Thunderforest API Key and signing in to your Thunderforest account.</a>
</em>
</td>
</tr>
</table>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input name="page_options" type="hidden" value="wpgpxmaps_height,wpgpxmaps_graph_height,wpgpxmaps_width,wpgpxmaps_download,wpgpxmaps_skipcache,wpgpxmaps_distance_type,wpgpxmaps_usegpsposition,wpgpxmaps_openstreetmap_apikey" />
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
</p>
</form>
<hr />
<form method="post" action="options.php">
<?php wp_nonce_field( 'update-options' ); ?>
<h3 class="title">
<?php esc_html_e( 'Summary table', 'wp-gpx-maps' ); ?>
</h3>
<table class="form-table">
<tr>
<th scope="row">
<?php esc_html_e( 'Summary table:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary" type="checkbox" value="true" <?php if ( true == $summary ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print summary details of your GPX track', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Total distance:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_tot_len" type="checkbox" value="true" <?php if ( true == $tot_len ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print total distance', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Max elevation:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_max_ele" type="checkbox" value="true" <?php if ( true == $max_ele ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print max elevation', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Min elevation:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_min_ele" type="checkbox" value="true" <?php if ( true == $min_ele ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print min elevation', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Total climbing:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_total_ele_up" type="checkbox" value="true" <?php if ( true == $total_ele_up ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print total climbing', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Total descent:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_total_ele_down" type="checkbox" value="true" <?php if ( true == $total_ele_down ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print total descent', 'wp-gpx-maps' ); ?>
</i>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Average speed:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_avg_speed" type="checkbox" value="true" <?php if ( true == $avg_speed ) { echo ( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print average speed', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Average cadence:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_avg_cad" type="checkbox" value="true" <?php if ( true == $avg_cad ) { echo ( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print average cadence', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Average heart rate:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_avg_hr" type="checkbox" value="true" <?php if ( true == $avg_hr ) { echo ( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print average heart rate', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Average temperature:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_avg_temp" type="checkbox" value="true" <?php if ( true == $avg_temp ) { echo ( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print average temperature', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Total time:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_summary_total_time" type="checkbox" value="true" <?php if ( true == $total_time ) { echo ( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Print total time', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
</table>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input name="page_options" type="hidden" value="wpgpxmaps_summary,wpgpxmaps_summary_tot_len,wpgpxmaps_summary_max_ele,wpgpxmaps_summary_min_ele,wpgpxmaps_summary_total_ele_up,wpgpxmaps_summary_total_ele_down,wpgpxmaps_summary_avg_speed,wpgpxmaps_summary_avg_cad,wpgpxmaps_summary_avg_hr,wpgpxmaps_summary_avg_temp,wpgpxmaps_summary_total_time" />
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
</p>
</form>
<hr />
<form method="post" action="options.php">
<?php wp_nonce_field( 'update-options' ); ?>
<h3 class="title">
<?php esc_html_e( 'Map', 'wp-gpx-maps' ); ?>
</h3>
<table class="form-table">
<tr>
<th scope="row">
<?php esc_html_e( 'Default map type:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input type="radio" name="wpgpxmaps_map_type" value="OSM1" <?php if ( 'OSM1' == $t ) echo 'checked'; ?>>
<?php
/* translators: map type */
esc_html_e( 'Open Street Map', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM2" <?php if ( 'OSM2' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Open Cycle Map / Thunderforest - Open Cycle Map (API Key required)', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM3" <?php if ( 'OSM3' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Thunderforest - Outdoors (API Key required)', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM4" <?php if ( 'OSM4' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Thunderforest - Transport (API Key required)', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM5" <?php if ( 'OSM5' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Thunderforest - Landscape (API Key required)', 'wp-gpx-maps' );
?>
<br />
<!-- <input type="radio" name="wpgpxmaps_map_type" value="OSM6" <?php if ( 'OSM6' == $t ) echo 'checked'; ?>>-->
<?php
/* translators: map provider / map type */
//esc_html_e( 'MapToolKit - Terrain', 'wp-gpx-maps' );
?>
<!--<br />-->
<input type="radio" name="wpgpxmaps_map_type" value="OSM7" <?php if ( 'OSM7' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Open Street Map - Humanitarian map style', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM9" <?php if ( 'OSM9' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Hike & Bike', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM10" <?php if ( 'OSM10' == $t ) echo 'checked'; ?>>
<?php
/* translators: map provider / map type */
esc_html_e( 'Open Sea Map', 'wp-gpx-maps' );
?>
<br />
<input type="radio" name="wpgpxmaps_map_type" value="OSM11" <?php if ( $t == 'OSM11' ) echo 'checked'; ?>>
<?php
echo ' ';
_e( 'GSI Map (Japan)', 'wp-gpx-maps' );
?>
<br />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Map line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_map_line_color" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_map_line_color' ); ?>" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'On mouse scroll wheel:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_zoomonscrollwheel" type="checkbox" value="true" <?php if ( true == $zoomonscrollwheel ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Enable zoom', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Waypoints support:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_show_waypoint" type="checkbox" value="true" <?php if ( true == $showW ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Show waypoints', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Start track icon:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_map_start_icon" type="text" value="<?php echo get_option( 'wpgpxmaps_map_start_icon' ); ?>" style="width:400px" />
<em>
<?php esc_html_e( '(URL to image) Leave empty to hide.', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'End track icon:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_map_end_icon" type="text" value="<?php echo get_option( 'wpgpxmaps_map_end_icon' ); ?>" style="width:400px" />
<em>
<?php esc_html_e( '(URL to image) Leave empty to hide.', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Current position icon:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_map_current_icon" type="text" value="<?php echo get_option( 'wpgpxmaps_map_current_icon' ); ?>" style="width:400px" />
<em>
<?php esc_html_e( '(URL to image) Leave empty to hide.', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Current GPS position icon:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_currentpositioncon" type="text" value="<?php echo get_option( 'wpgpxmaps_currentpositioncon' ); ?>" style="width:400px" />
<em>
<?php esc_html_e( '(URL to image) Leave empty to hide.', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Custom waypoint icon:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_map_waypoint_icon" type="text" value="<?php echo get_option( 'wpgpxmaps_map_waypoint_icon' ); ?>" style="width:400px" />
<em>
<?php esc_html_e( '(URL to image) Leave empty to hide.', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
</table>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input name="page_options" type="hidden" value="wpgpxmaps_map_type,wpgpxmaps_map_line_color,wpgpxmaps_zoomonscrollwheel,wpgpxmaps_show_waypoint,wpgpxmaps_map_start_icon,wpgpxmaps_map_end_icon,wpgpxmaps_map_current_icon,wpgpxmaps_currentpositioncon,wpgpxmaps_map_waypoint_icon" />
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
</p>
</form>
<hr />
<form method="post" action="options.php">
<?php wp_nonce_field( 'update-options' ); ?>
<h3 class="title">
<?php esc_html_e( 'Chart', 'wp-gpx-maps' ); ?>
</h3>
<table class="form-table">
<tr>
<th scope="row">
<?php esc_html_e( 'Altitude:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input type="checkbox" <?php if ( true == $showEle ) { echo( 'checked' ); } ?> onchange="wpgpxmaps_show_elevation.value = this.checked" onload="wpgpxmaps_show_elevation.value = this.checked" />
<i>
<?php esc_html_e( 'Show altitude', 'wp-gpx-maps' ); ?>
</i>
<input name="wpgpxmaps_show_elevation" type="hidden" value="<?php echo $showEle; ?>">
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Altitude line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_line_color" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_graph_line_color' ); ?>" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Unit of measure:', 'wp-gpx-maps' ); ?>
</th>
<td>
<select name='wpgpxmaps_unit_of_measure'>
<option value="0" <?php if ( '0' == $uom ) echo 'selected'; ?>>
<?php
/* translators: chart axis labels */
esc_html_e( 'meters / meters', 'wp-gpx-maps' );
?>
</option>
<option value="1" <?php if ( '1' == $uom ) echo 'selected'; ?>>
<?php
/* translators: chart axis labels */
esc_html_e( 'feet / miles', 'wp-gpx-maps' );
?>
</option>
<option value="2" <?php if ( '2' == $uom ) echo 'selected'; ?>>
<?php
/* translators: chart axis labels */
esc_html_e( 'meters / kilometers', 'wp-gpx-maps' );
?>
</option>
<option value="3" <?php if ( '3' == $uom ) echo 'selected'; ?>>
<?php
/* translators: chart axis labels */
esc_html_e( 'meters / nautical miles', 'wp-gpx-maps' );
?>
</option>
<option value="4" <?php if ( '4' == $uom ) echo 'selected'; ?>>
<?php
/* translators: chart axis labels */
esc_html_e( 'meters / miles', 'wp-gpx-maps' );
?>
</option>
<option value="5" <?php if ( '5' == $uom ) echo 'selected'; ?>>
<?php
/* translators: chart axis labels */
esc_html_e( 'feet / nautical miles', 'wp-gpx-maps' );
?>
</option>
</select>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Altitude display offset:', 'wp-gpx-maps' ); ?>
</th>
<td>
<?php esc_html_e( 'From', 'wp-gpx-maps' ); ?>
<input name="wpgpxmaps_graph_offset_from1" type="text" value="<?php echo get_option( 'wpgpxmaps_graph_offset_from1' ); ?>" style="width:50px;" />
<?php esc_html_e( 'to', 'wp-gpx-maps' ); ?>
<input name="wpgpxmaps_graph_offset_to1" type="text" value="<?php echo get_option( 'wpgpxmaps_graph_offset_to1' ); ?>" style="width:50px;" />
<em>
<?php esc_html_e( '(leave empty for auto scale)', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Speed:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_show_speed" type="checkbox" value="true" <?php if ( true == $showSpeed ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Show speed', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Speed line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_line_color_speed" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_graph_line_color_speed' ); ?>" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Speed unit of measure:', 'wp-gpx-maps' ); ?>
</th>
<td>
<select name='wpgpxmaps_unit_of_measure_speed'>
<option value="0" <?php if ( '0' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'm/s', 'wp-gpx-maps' );
?>
</option>
<option value="1" <?php if ( '1' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'km/h', 'wp-gpx-maps' );
?>
</option>
<option value="2" <?php if ( '2' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'miles/h', 'wp-gpx-maps' );
?>
</option>
<option value="3" <?php if ( '3' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'min/km', 'wp-gpx-maps' );
?>
</option>
<option value="4" <?php if ( '4' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'min/miles', 'wp-gpx-maps' );
?>
</option>
<option value="5" <?php if ( '5' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'Knots (nautical miles / hour)', 'wp-gpx-maps' );
?>
</option>
<option value="6" <?php if ( '6' == $uomSpeed ) echo 'selected'; ?>>
<?php
/* translators: speed unit of measure */
esc_html_e( 'min/100 meters', 'wp-gpx-maps' );
?>
</option>
</select>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Speed display offset:', 'wp-gpx-maps' ); ?>
</th>
<td>
<?php esc_html_e( 'From', 'wp-gpx-maps' ); ?>
<input name="wpgpxmaps_graph_offset_from2" type="text" value="<?php echo get_option( 'wpgpxmaps_graph_offset_from2' ); ?>" style="width:50px;" />
<?php esc_html_e( 'to', 'wp-gpx-maps' ); ?>
<input name="wpgpxmaps_graph_offset_to2" type="text" value="<?php echo get_option( 'wpgpxmaps_graph_offset_to2' ); ?>" style="width:50px;" />
<em>
<?php esc_html_e( '(leave empty for auto scale)', 'wp-gpx-maps' ); ?>
</em>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Heart rate (where aviable):', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_show_hr" type="checkbox" value="true" <?php if ( true == $showHr ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Show heart rate', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Heart rate line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_line_color_hr" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_graph_line_color_hr' ); ?>" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Temperature (where aviable):', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_show_atemp" type="checkbox" value="true" <?php if ( true == $showAtemp ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Show temperature', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Temperature line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_line_color_atemp" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_graph_line_color_atemp' ); ?>" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Cadence (where aviable):', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_show_cadence" type="checkbox" value="true" <?php if ( true == $showCad ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Show cadence', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Cadence line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_line_color_cad" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_graph_line_color_cad' ); ?>" />
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Grade:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_show_grade" type="checkbox" value="true" <?php if ( true == $showGrade ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Show grade - BETA (Grade values depends on your GPS accuracy. If you have a poor GPS accuracy they might be totally wrong!)', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Grade line color:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_graph_line_color_grade" type="color" data-hex="true" value="<?php echo get_option( 'wpgpxmaps_graph_line_color_grade' ); ?>" />
</td>
</tr>
</table>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input name="page_options" type="hidden" value="wpgpxmaps_show_elevation,wpgpxmaps_graph_line_color,wpgpxmaps_unit_of_measure,wpgpxmaps_show_speed,wpgpxmaps_graph_line_color_speed,wpgpxmaps_show_hr,wpgpxmaps_graph_line_color_hr,wpgpxmaps_unit_of_measure_speed,wpgpxmaps_graph_offset_from1,wpgpxmaps_graph_offset_to1,wpgpxmaps_graph_offset_from2,wpgpxmaps_graph_offset_to2,wpgpxmaps_graph_line_color_cad,wpgpxmaps_show_cadence,wpgpxmaps_show_grade,wpgpxmaps_graph_line_color_grade,wpgpxmaps_show_atemp,wpgpxmaps_graph_line_color_atemp" />
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
</p>
</form>
<hr />
<form method="post" action="options.php">
<?php wp_nonce_field( 'update-options' ); ?>
<h3 class="title">
<?php esc_html_e( 'Advanced Options', 'wp-gpx-maps' ); ?>
</h3>
<em>
<?php esc_html_e( '(Do not edit if you don’t know what you are doing!)', 'wp-gpx-maps' ); ?>
</em>
<table class="form-table">
<tr>
<th scope="row">
<?php esc_html_e( 'Skip GPX points closer than:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_pointsoffset" type="text" id="wpgpxmaps_pointsoffset" value="<?php echo $po; ?>" style="width:50px;" />
<i>
<?php esc_html_e( 'meters', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
<tr>
<th scope="row">
<?php esc_html_e( 'Reduce GPX:', 'wp-gpx-maps' ); ?>
</th>
<td>
<input name="wpgpxmaps_donotreducegpx" type="checkbox" value="true" <?php if ( true == $donotreducegpx ) { echo( 'checked' ); } ?> onchange="this.value = (this.checked)" />
<i>
<?php esc_html_e( 'Do not reduce GPX', 'wp-gpx-maps' ); ?>
</i>
</td>
</tr>
</table>
<p class="submit">
<input type="hidden" name="action" value="update" />
<input name="page_options" type="hidden" value="wpgpxmaps_donotreducegpx,wpgpxmaps_pointsoffset" />
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
</p>
</form>
</div>
</div>