-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
285 lines (270 loc) · 12.6 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Feature Layer Labs</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet.fullscreen@1.4.3/Control.FullScreen.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet-routing-machine@3.2.12/dist/leaflet-routing-machine.css" />
<link rel="stylesheet" href="https://unpkg.com/sidebar-v2@0.4.0/css/leaflet-sidebar.min.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet-contextmenu@1.4.0/dist/leaflet.contextmenu.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://unpkg.com/flatpickr@4.6.2/dist/flatpickr.min.css">
<link rel="stylesheet" href="./forkme.css" />
<link rel="stylesheet" href="./index.css" />
<style>
body {
padding: 0;
margin: 0;
}
html,
body,
#map {
height: 100%;
font: 10pt "Helvetica Neue", Arial, Helvetica, sans-serif;
}
h3.link-footer {
margin-top: 0.2em;
margin-bottom: 3em;
}
.leaflet-top-pane {
pointer-events: none;
}
div.leaflet-routing-geocoders input {
width: calc(100% - 6px); /* fixes wrong line-break in chrome */
}
.travelMarker0 {
fill: yellow;
opacity: 0.75;
}
.travelMarker1 {
fill: #a00;
opacity: 0.75;
}
.travelMarker2 {
fill: black;
opacity: 0.5;
}
.waypoints {
fill: black;
opacity: 0;
}
.lineConnect {
fill: none;
stroke: black;
opacity: 1;
}
.leaflet-routing-alt i {
width: 18px;
height: 18px;
float: left;
margin-right: 8px;
opacity: 0.7;
}
</style>
</head>
<body>
<!-- <div class="github-fork-ribbon-wrapper right-bottom">
<div class="github-fork-ribbon">
<a href="https://github.com/ptv-logistics/fl-labs/" target="_blank">Fork me on GitHub</a>
</div>
</div> -->
<div id="sidebar" class="sidebar collapsed">
<!-- Nav tabs -->
<ul class="sidebar-tabs" role="tablist">
<li><a href="#home" role="tab"><i class="fa fa-flag"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-tachometer"></i></a></li>
<li><a href="#about" role="tab"><i class="fa fa-info"></i></a></li>
</ul>
<!-- Tab panes -->
<div class="sidebar-content active">
<div class="sidebar-pane" id="home">
<h2>
Feature Layer Labs
</h2>
<h3>
You can change the waypoints by dragging them on the map or entering an address at the address input field.
</h3>
<div>
<p>
<label for="scenarioSelect">Sample Route</label>
<select id="scenarioSelect" onchange="updateScenario()">
<option>New York</option>
<option>Paris</option>
<option>Karlsruhe</option>
</select>
</p>
<div style="margin: 10px 0px 10px 0px;">
<div>Consider layers for routing:</div>
<div><input type="checkbox" id="enableTrafficIncidents" onchange="updateParams()">Traffic Incidents</div>
<div><input type="checkbox" id="enableSpeedPatterns" onchange="updateParams()">Speed Patterns</div>
<div><input type="checkbox" id="enableTruckAttributes" onchange="updateParams()">Truck Attributes</div>
<div><input type="checkbox" id="enableRestrictionZones" onchange="updateParams()">Restriction Zones</div>
</div>
<div style="margin: 10px 0px 10px 0px;">
Routing Profile
<select id="routingProfile" onchange="updateParams()">
<option>carfast</option>
<option>carslow</option>
<option>truckfast</option>
<option>truckslow</option>
<option>delivery</option>
<option>emergency</option>
<option>bicycle</option>
<option>bicycle-oneway</option>
<option>pedestrian</option>
<option>mg-car</option>
<option>mg-trailer-truck</option>
<option>mg-transporter</option>
<option>mg-truck-11.99t</option>
<option>mg-truck-40t</option>
<option>mg-truck-7.5t</option>
</select>
</div>
<div style="margin: 10px 0px 10px 0px;">
<div>Select time of day</div>
<input id="range" type="text" style="width:120" onchange="updateParams(true)" />
<label for="utc">Z</label>
<input id="utc" type="number" onchange="updateParams(true)" style="width:32px" />
<button onclick="setNow()">Now</button>
</div>
<p>
<div style="margin: 10px 0px 10px 0px;">
Itinerary Language
<select id="languageSelect" onchange="updateParams()">
<option>EN</option>
<option>DE</option>
<option>FR</option>
<option>NL</option>
<option>RO</option>
<option>DA</option>
<option>PL</option>
<option>CS</option>
<option>SK</option>
<option>SR</option>
<option>BG</option>
<option>SL</option>
<option>HR</option>
<option>x-ptv-BOS</option>
<option>UK</option>
<option>RU</option>
<option>ES</option>
<option>IT</option>
<option>SV</option>
<option>PT</option>
</select>
</div>
<div style="margin: 10px 0px 10px 0px;">
incidents Language
<select id="flLanguage" onchange="updateParams(true)">
<option>EN</option>
<option>DE</option>
<option>FR</option>
<option>IT</option>
<option>NL</option>
</select>
</div>
<div><input type="checkbox" id="useImperial" onchange="updateParams(true)">Show imperial units</div>
</p>
<div><input type="checkbox" id="dynamicTimeOnStaticRoute" onchange="updateParams(false)">Show static Route
/w dynamic Time</div>
<div><input type="checkbox" id="staticTimeOnStaticRoute" onchange="updateParams(false)">Show static Route</div>
<div style="margin: 10px 0px 10px 0px;">
Replay Speed
<select id="replaySpeed" onchange="replay()">
<option>1</option>
<option>2.5</option>
<option>5</option>
<option>10</option>
<option>25</option>
<option>50</option>
<option>100</option>
<option>250</option>
<option>500</option>
<option>1000</option>
<option>2500</option>
<option>5000</option>
<option>10000</option>
</select>
</div>
<div>
<button onclick="replay()">Replay</button>
<input type="checkbox" id="doLoop" onchange="replay()">Loop
</div>
<p>
<div>
Paste an xRoute request here and extract the coordinates
<textarea id="RequestInput" rows="1" ></textarea><button onclick="parseRequest()">Parse</button>
</div>
</p>
</div>
</div>
<div class="sidebar-pane" id="profile">
<h3>
You can customize the profile with an XML snippet here.
</h3>
<h4>
If you don't specify the FeatureLayer section, the settings from the route tab are used.
</h4>
<div>
<button onclick="route()">Route</button>
</div>
<div>
<textarea id="ProfileInput" rows="50" style="width:100%;"></textarea>
</div>
</div>
<div class="sidebar-pane" id="about">
<div>
<p>
<h2>Powered by</h2>
</p>
<p>
<div>
<a href="http://xserver.ptvgroup.com/de/produkte/ptv-xserver-internet/" target="_blank"><img src="./images/xserver.png"></a>
<h3 class="link-footer">PTV xServer internet</h3>
</div>
</p>
<p>
<div>
<a href="http://leafletjs.com/" target="_blank"><img src="./images/leaflet.png"></a>
<h3 class="link-footer">Leaflet</h3>
</div>
</p>
<p>
<div>
<a href="http://www.liedman.net/leaflet-routing-machine/" target="_blank"><img src="./images/lrm.svg"></a>
<h3 class="link-footer">Leaflet Routing Machine</h3>
</div>
</p>
<p>
<div>
<a href="http://d3js.org" target="_blank"><img src="./images/d3.svg"></a>
<h3 class="link-footer">Data Driven Documents</h3>
</div>
</p>
</div>
</div>
</div>
</div>
<div id="map" class="sidebar-map"></div>
<script src="https://unpkg.com/jquery@3.2.1/dist/jquery.min.js"></script>
<script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet.fullscreen@1.4.3/Control.FullScreen.js"></script>
<script src="https://unpkg.com/leaflet.nontiledlayer@1.0.8/dist/NonTiledLayer.js"></script>
<script src="https://unpkg.com/leaflet-routing-machine@3.2.12/dist/leaflet-routing-machine.js"></script>
<script src="https://unpkg.com/sidebar-v2@0.4.0/js/leaflet-sidebar.min.js"></script>
<script src="https://unpkg.com/leaflet-contextmenu@1.4.0/dist/leaflet.contextmenu.min.js"></script>
<script src="https://unpkg.com/leaflet.icon.glyph@0.2.0/Leaflet.Icon.Glyph.js"></script>
<script src="https://unpkg.com/d3@3.5.5/d3.min.js"></script>
<script src="https://unpkg.com/moment@2.29.2/moment.js"></script>
<script src="https://unpkg.com/flatpickr@4.6.2/dist/flatpickr.min.js"></script>
<script src="./Control.Geocoder.ptv.js"></script>
<script src="./Leaflet.PtvLayer.js"></script>
<script src="./routing-machine-ptv.js"></script>
<script src="./d3layer.js"></script>
<script src="./animatedRoute.js"></script>
<script src="./token.js"></script>
<script src="./tools.js"></script>
<script src="./index.js"></script>
</body>
</html>