-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
168 lines (139 loc) · 3.61 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
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
<!doctype html>
<html>
<meta charset="utf-8">
<title>GPX editor</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script>google.charts.load('current', {packages: ['corechart', 'line']});</script>
<section id="input" class="container">
<label for="input-gpx">Upload GPX file (drag & drop or click & select):</label>
<input type="file" id="input-gpx">
</section>
<section id="editor">
<div class="container">
<div class="left-column">
<p>
<a class="btn btn-primary" download="generated.gpx" href="javascript:;" id="download-gpx">
Download GPX</a>
<a class="btn btn-default" href="">Back</a>
</p>
<table id="split-table" class="table">
<thead>
<tr>
<th>Include</th>
<th>Distance</th>
<th>Time</th>
<th>Max speed</th>
<th>Avg speed</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="right-column">
<div id="lf-map"></div>
</div>
</div>
<div class="container map-container">
<div id="g-chart"></div>
</div>
</section>
<style>
body {
overflow-x: hidden;
}
section {
margin: 2rem 0;
}
#editor {
display: none;
}
#editor .container {
display: flex;
flex-wrap: wrap;
}
#editor .left-column {
min-height: calc(100vh - 320px);
min-width: 500px;
padding-right: 40px;
}
#input-gpx {
border: 3px dashed #ccc;
padding: calc(50vh - 8em) calc(50% - 160px);
margin-top: 4em;
text-align: center;
width: 100%;
}
label[for="input-gpx"] {
position: absolute;
margin: 5em 1em;
}
#editor .right-column {
min-height: 400px;
min-width: 500px;
flex-grow: 1;
}
#lf-map {
height: 100%;
flex-grow: 1;
}
#editor .map-container {
overflow: hidden;
}
#g-chart {
height: 380px;
margin: -50px -150px -50px -50px;
width: calc(100% + 200px);
}
#lf-map .leaflet-tile {
opacity: 1 !important;
}
#lf-map .leaflet-tile-pane {
opacity: .7;
}
#lf-map .leaflet-popup-close-button {
display: none;
}
#lf-map .leaflet-popup-content {
text-align: center;
}
tr {
cursor: pointer;
}
th {
text-align: center;
vertical-align: middle !important;
}
td {
text-align: right;
vertical-align: middle !important;
}
tr .marker {
border: 2px solid;
display: block;
height: 1em;
margin: 0 auto;
width: 1em;
}
tr.is-enabled .marker {
border: .5em solid;
height: 0;
width: 0;
}
tbody tr:hover, tr.is-selected {
background: #eee;
}
@media (max-width: 1199px) {
#editor .left-column {
min-width: 100%;
padding-right: 0;
}
}
</style>
<script src="gpx.js"></script>
<script src="gps-distance.js"></script>
<script src="editor.js"></script>
</html>