forked from nrenner/brouter-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
305 lines (284 loc) · 18 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>BRouter web client</title>
<!-- inject:css -->
<link rel="stylesheet" href="dist/brouter-web.css" />
<!-- endinject -->
</head>
<body class="flexcolumn">
<nav class="navbar navbar-full navbar-dark bg-inverse">
<div class="navbar-header">
<a class="navbar-brand" href="#" data-toggle="modal" data-target="#about">BRouter-Web <sup class="version">0.7.0</sup></a>
<button class="navbar-toggler hidden-md-up" type="button" data-toggle="collapse" data-target="#collapsingNavbar" aria-controls="collapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="fa fa-bars"></span>
</button>
</div>
<div class="collapse navbar-toggleable-sm" id="collapsingNavbar">
<div class="nav navbar-nav">
<form class="nav-item form-inline">
<div class="form-group">
<select class="selectpicker show-tick" data-width="250px" id="profile-alternative" multiple>
<optgroup label="Profile" data-max-options="1" data-icon="fa-bicycle" id="profile">
<option>Custom</option>
</optgroup>
<optgroup label="Alternative" data-max-options="1" data-icon="fa-random" id="alternative">
<option value="0" selected>Original</option>
<option value="1">1st alternative</option>
<option value="2">2nd alternative</option>
<option value="3">3rd alternative</option>
</optgroup>
</select>
</div>
</form>
<div class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
<span class="fa fa-lg fa-cloud-download" aria-hidden="true"></span>Download</a>
<div class="dropdown-menu">
<a class="dropdown-item" id="dl-gpx" href="#" disabled>GPX</a>
<a class="dropdown-item" id="dl-kml" href="#" disabled>KML</a>
<a class="dropdown-item" id="dl-geojson" href="#" disabled>GeoJSON</a>
<a class="dropdown-item" id="dl-csv" href="#" disabled>data CSV</a>
</div>
</div>
<div class="nav-item">
<a class="nav-link" href="#" data-toggle="modal" data-target="#about"><span class="fa fa-lg fa-info-circle" aria-hidden="true"></span>About</a>
</div>
</div>
</div>
</nav>
<!-- Credits modal window -->
<div class="modal fade" id="credits" tabindex="-1" role="dialog" aria-labelledby="Credits window" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Credits</h4>
</div>
<div class="modal-body">
<dl>
<dt>Map data</dt>
<dd>
© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>
under <a target="_blank" href="https://opendatacommons.org/licenses/odbl/">ODbL</a>
</dd>
<dd>
Search by <a href="https://wiki.openstreetmap.org/wiki/Nominatim" target="_blank">Nominatim</a>
</dd>
<dt>OpenStreetMap tiles</dt>
<dd>
<a target="_blank" href="https://www.openstreetmap.org/copyright">openstreetmap.org</a>
under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA 2.0</a>
</dd>
<dt>OpenStreetMap.de tiles</dt>
<dd>
<a target="_blank" href="https://openstreetmap.de/karte.html">openstreetmap.de</a>
</dd>
<dt>OpenTopoMap tiles</dt>
<dd>
© <a target="_blank" href="https://opentopomap.org">OpenTopoMap</a>
under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>
<a target="_blank" href="http://viewfinderpanoramas.org">SRTM</a>
</dd>
<dt>OpenCycleMap & Outdoors tiles</dt>
<dd>
© <a target="_blank" href="https://www.thunderforest.com">Thunderforest</a>
under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA 2.0</a>
</dd>
<dt>Esri World Imagery</dt>
<dd>
<a target="_blank" href="http://goto.arcgisonline.com/maps/World_Imagery">World Imagery</a>
© <a target="_blank" href="https://www.esri.com/">Esri</a>, sources:
Esri, DigitalGlobe, Earthstar Geographics, CNES/Airbus DS, GeoEye, USDA FSA, USGS, Getmapping, Aerogrid, IGN, IGP, and the GIS User Community
</dd>
<dt>Cycling & Hiking tiles</dt>
<dd>
© <a target="_blank" href="https://cycling.waymarkedtrails.org">Waymarked Trails</a>
under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0/de/deed.en">CC-BY-SA 3.0 DE</a>
</dd>
<dt>BRouter</dt>
<dd>
<a target="_blank" href="http://brouter.de/brouter">BRouter</a> © Arndt Brenschede
</dd>
</dl>
</div>
</div>
</div>
</div>
<!-- Layers modal window -->
<div class="modal fade" id="custom_layers" tabindex="-1" role="dialog" aria-labelledby="Layers window" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Customize layers</h4>
</div>
<div class="modal-body">
<input class="form-control" type="text" id="layer_name" spellcheck="true" wrap="off" placeholder="Custom layer name. (ex: OpenStreetMap)"></input>
<input class="form-control" type="text" id="layer_url" spellcheck="false" wrap="off" placeholder="Custom layer URL. (ex: https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png)"></input>
<button type="button" id="custom_layers_add_base" class="btn btn-success">Add base layer</button>
<button type="button" id="custom_layers_add_overlay" class="btn btn-success">Add overlay</button>
<button type="button" id="custom_layers_remove" class="btn btn-danger">Remove selection</button>
<table id="custom_layers_table"></table>
</div>
</div>
</div>
</div>
<!-- About modal window -->
<div class="modal fade" id="about" tabindex="-1" role="dialog" aria-labelledby="About window" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">About</h4>
</div>
<div class="modal-body">
<p>Online service of the BRouter routing engine. For the offline Android app and more information
see <a href="http://brouter.de/" target="_blank">brouter.de</a>.</p>
<p>
<i>Contact:</i><br>
<ul>
<li>General discussions/questions, support:<br>
<a href="https://groups.google.com/group/osm-android-bikerouting" target="_blank">https://groups.google.com/group/osm-android-bikerouting</a>
</li>
<li>Bug reports and feature requests:
<ul>
<li>
server / backend, routing engine, Android app, profiles, brouter.de site:<br>
<a href="https://github.com/abrensch/brouter/issues" target="_blank">https://github.com/abrensch/brouter/issues</a>
</li>
<li>
web client / frontend:<br>
<a href="https://github.com/nrenner/brouter-web/issues" target="_blank">https://github.com/nrenner/brouter-web/issues</a>
</li>
</ul>
</li>
</ul>
</p>
<p>
<i>Data:</i><br>
This is based on <a href="https://www.openstreetmap.org" target="_blank">OpenStreetMap</a>. It is usually updated once a week when a new Planet file is available,
see dates of <a href="http://brouter.de/brouter/segments4/" target="_blank">data files</a>.
</p>
<p>
<i><a href="http://brouter.de/privacypolicy.html" target="_blank">Privacy Policy</a></i>,
<i><a href="https://github.com/nrenner/brouter-web#credits-and-licenses" target="_blank">Credits</a></i>,
<i><a href="https://github.com/nrenner/brouter-web/blob/master/CHANGELOG.md" target="_blank">Changelog</a></i> and
<i><a href="https://github.com/nrenner/brouter-web#readme" target="_blank">more info</a></i> on the client.
</p>
</div>
</div>
</div>
</div>
<div id="content" class="flexcolumn flexgrow">
<div id="sidebarTabs" class="leaflet-sidebar-tabs collapsed">
<ul role="tablist">
<li><a href="#tab_layers_control" role="tab" title="Layers">
<!--
https://github.com/feathericons/feather/blob/0dc2bf5c9d01759e47485d9498aefc02cac1d845/icons/layers.svg
MIT License: https://github.com/feathericons/feather/blob/master/LICENSE
modifications: line gap -0.5, stroke-width +0.2
-->
<svg class="fa" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
<polygon style="fill: currentColor" points="12 2 2 7 12 12 22 7 12 2"></polygon>
<polyline points="2 11.5 12 16.5 22 11.5"></polyline>
<polyline points="2 16 12 21 22 16"></polyline>
</svg>
</a></li>
<li hidden><a href="#tab_itinerary" role="tab" title="Itinerary"><i class="fa fa-map-signs"></i></a></li>
<li><a href="#tab_profile" role="tab" title="Custom profile"><i class="fa fa-wrench"></i></a></li>
<li><a href="#tab_data" role="tab" title="Data"><i class="fa fa-table"></i></a></li>
</ul>
</div>
<div class="leaflet-sidebar-flex-row flexgrow">
<div id="map" class="leaflet-sidebar-map">
<div id="message"></div>
</div>
<div id="sidebar" class="leaflet-sidebar collapsed">
<div class="leaflet-sidebar-content">
<div class="leaflet-sidebar-pane" id="tab_layers_control">
<h1 class="leaflet-sidebar-header"><span class="leaflet-sidebar-close"><i class="fa fa-caret-right"></i></span>Layers</h1>
<div id="layers-control-wrapper"></div>
<div class="leaflet-control-layers-separator"></div>
<div>
<button type="button" id="custom_layers_button" class="btn btn-sm pull-right" title="Add or remove custom layers"><span class="fa fa-plus-square"></span> Custom layers</button>
</div>
</div>
<div class="leaflet-sidebar-pane" id="tab_profile">
<h1 class="leaflet-sidebar-header"><span class="leaflet-sidebar-close"><i class="fa fa-caret-right"></i></span><span class="leaflet-sidebar-expand"><i class="fa fa-expand"></i></span>Custom profile</h1>
<form class="flexcolumn flexgrow">
<textarea class="form-control flexgrow" id="profile_upload" spellcheck="false" wrap="off" placeholder="Write your custom profile here."></textarea>
<div id="profile_message"></div>
<div class="form-group" id="profile_buttons">
<button id="upload" type="button" class="btn btn-sm" data-uploading-text="Uploading…"><span class="fa fa-cloud-upload"></span> Upload</button>
<button id="clear" type="button" class="btn btn-sm"><span class="fa fa-eraser"></span> Clear</button>
<a href="http://brouter.de/brouter/costfunctions.html" target="_blank" class="btn btn-sm btn-info pull-right"><span class="fa fa-question"></span> Help</a>
</div>
</form>
</div>
<div class="leaflet-sidebar-pane" id="tab_data">
<h1 class="leaflet-sidebar-header"><span class="leaflet-sidebar-close"><i class="fa fa-caret-right"></i></span><span class="leaflet-sidebar-expand"><i class="fa fa-expand"></i></span>Data</h1>
<table id="datatable" class="mini cell-border hover stripe"></table>
</div>
<div class="leaflet-sidebar-pane" id="tab_itinerary">
<h1 class="leaflet-sidebar-header">Itinerary<span class="leaflet-sidebar-close"><i class="fa fa-caret-right"></i></span><span class="leaflet-sidebar-expand"><i class="fa fa-expand"></i></span></h1>
<div id="itinerary" class="flexcolumn flexgrow">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="collapse" id="elevation-chart"></div>
<footer>
<div class="flexrow">
<ul id="stats">
<li>
<div class="text-muted small hidden-sm-down">Distance</div>
<p class="stats-label"><span id="distance">0</span> <abbr title="kilometer">km</abbr></p>
</li>
<li hidden>
<div class="text-muted small hidden-sm-down">Travel time</div>
<p class="stats-label"><span id="totaltime">0</span> <abbr title="minutes">min</abbr></p>
</li>
<li hidden>
<div class="text-muted small hidden-sm-down">Total Energy (per 100km)</div>
<p class="stats-label"><span id="totalenergy">0 (0)</span> <abbr title="kilowatt hour">kWh</abbr></p>
</li>
<li>
<div class="text-muted small hidden-sm-down">Ascend (Plain ascend)</div>
<p class="stats-label"><span id="ascend">0 (0)</span> <abbr title="meter">m</abbr></p>
</li>
<li>
<div class="text-muted small hidden-sm-down">Cost (Mean cost factor)</div>
<p class="stats-label"><span id="cost">- (-)</span></p>
</li>
</ul>
<button class="btn btn-secondary btn-sm" type="button" data-toggle="collapse" data-target="#elevation-chart" aria-controls="elevation-chart" id="elevation-btn" aria-expanded="false" aria-label="Toggle elevation chart">
<span class="fa fa-area-chart"></span>
</button>
</div>
</footer>
<script>
// global package prefix for BRouter web application
BR = {};
console.log('\r\n###\r\n### BRouter-Web\r\n###\r\n### Please note that the routing API used here is not public!\r\n###\r\n');
</script>
<script src="dist/url-search-params.js"></script>
<script src="config.js"></script>
<script src="keys.js"></script>
<!-- "gulp inject" for debugging -->
<!-- inject:js -->
<script src="dist/brouter-web.js"></script>
<!-- endinject -->
</body>
</html>