This repository has been archived by the owner on Aug 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
207 lines (193 loc) · 10.3 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
<!DOCTYPE html>
<html data-ng-app="routing">
<head>
<meta charset="utf-8" />
<title>Leaflet Routing Machine - Vahalla </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css" />
<link rel="stylesheet" href="css/leaflet-routing-machine.css" />
<link rel="stylesheet" href="css/valhalla.css" />
<link rel="stylesheet" href="css/elevation.css" />
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.standalone.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-geocoder-mapzen/1.4.1/leaflet-geocoder-mapzen.css" >
<script src="conf/env.conf"></script>
<!-- Main tangram library -->
<script src="https://mapzen.com/tangram/0.13.0/tangram.debug.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script language="javascript" type="text/javascript" src="js/calendar/datetimepicker.js">
//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com
</script>
<script type = "text/javascript" src="../flot/jquery.flot.min.js"></script>
<script type = "text/javascript" src="../flot/jquery.flot.symbol.min.js"></script>
<script type="text/javascript" src="../flot/jquery.flot.js"></script>
<script type="text/javascript" src="../flot/jquery.colorhelpers.js"></script>
<script type="text/javascript" src="../flot/jquery.flot.canvas.js"></script>
<script type="text/javascript" src="../flot/jquery.flot.stack.js"></script>
<style>
body{
width: 100%;
height: 100%;
}
#mapwrapper{
padding:0;
}
.transparent_btn{
height:30px;
margin-bottom:10px;
}
.transparent_btn:hover{
background-color:#ccc;
}
/* .info {
display: inline-block;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
}*/
</style>
</head>
<body>
<div class="container-fluid" data-ng-controller="RouteController">
<div class="col-md-2 info">
<div id="instructions">
<img src="images/turnbyturnlogo.png" alt="logo">
<p><h6><b>Point & click on the map to select a start & end point.</b><br>
<b>Defaults to auto.</b><br>
Change route to use other methods of travel (auto, bicycle, pedestrian, or transit) from one of the mode buttons below.</h6></p>
<h5><b><a target="_blank" href='https://github.com/valhalla/valhalla-docs/blob/master/api-reference.md'>Turn-by-Turn API reference</a></b></h5>
<hr>
<h4>Point & Click Route Testing</h4>
<span style="color:black" class="descriptions">Select a locale:</span><br>
<select id = "locale_dropdown" onchange="selectLocale()">
<option id=en-US selected="selected" value="en-US">en-US</option>
<option id=de-DE value="de-DE">de-DE</option>
<option id=it-IT value="it-IT">it-IT</option>
<option id=cs-CZ value="cs-CZ">cs-CZ</option>
<option id=fr-FR value="fr-FR">fr-FR</option>
<option id=es-ES value="es-ES">es-ES</option>
<option id=hi-IN value="hi-IN">hi-IN</option>
<option id=ca-ES value="ca-ES">ca-ES</option>
<option id=sl-SI value="sl-SI">sl-SI</option>
<option id=ru-RU value="ru-RU">ru-RU</option>
<option id=pirate value="pirate">pirate</option>
</select>
<br><br>
<div>
<span style="color:black" class="descriptions">Routing Options: </span><br>
<form>
<input type="button" id="showbtn" name="showbtn" value="Show"/>
<input type="button" id="hidebtn" name="hidebtn" value="Hide"/>
</form>
</div>
<div id="driveoptions" name="driveoptions" style="display:none">
<form id="auto" name="auto" ><span style="color:black">
<h5><b>Auto Options:</b></h5><p>
<i>Coming soon!</i>
</form>
<hr>
</div>
<div id="bikeoptions" name="bikeoptions" style="display:none">
<form id="bike" name="bike" ><span style="color:black">
<h5><b>Bicycle Options:</b></h5><p>
road: <input type="radio" name="btype" value="Road" checked/>
cross: <input type="radio" name="btype" value="Cross" />
hybrid: <input type="radio" name="btype" value="Hybrid" />
mountain: <input type="radio" name="btype" value="Mountain"/>
<br>
use roads (0-1): <input type="textbox" id="use_roads" value="0.5" class="biketextbox"/><br>
cycling speed (between 5 and 60kph): <input type="textbox" id="cycle_speed" value="25.0" class="biketextbox"/><br>
use hills (0-1): <input type="textbox" id="use_hills" value="0.5" class="biketextbox"/>
</span>
</form>
<hr>
</div>
<div id="walkoptions" name="walkoptions" style="display:none">
<form id="walk" name="walk" ><span style="color:black">
<h5><b>Pedestrian Options:</b></h5><p>
<i>Coming soon!</i>
</form>
<hr>
</div>
<div id="transitoptions" name="transitoptions" style="display:none">
<form id="transit" name="transit" ><span style="color:black">
<h5><b>Transit Options:</b></h5><p>
use_bus (0-1): <input type="textbox" id="use_bus" value="0.3" class="transittextbox"/><br>
use_rail (0-1): <input type="textbox" id="use_rail" value="0.6" class="transittextbox"/><br>
use_transfers (0-1): <input type="textbox" id="use_transfers" value="0.3" class="transittextbox"/>
</span>
</form>
<hr>
</div>
<div id="dtoptions" name="dtoptions" style="display:none">
<form id="datetime" name="datetime" ><span style="color:black">
<h5><b>Date & Time Options:</b></h5><p>
Current: <input type="radio" name="dttype" value="0" checked/>
Depart: <input type="radio" name="dttype" value="1"/>
Arrive: <input type="radio" name="dttype" value="2"/>
<br><p>
<span style="color:black" class="descriptions"><b>Select a new date and/or time, then click a mode of travel.</b></span><br>
<input type="text" id="datepicker" size="25"><a href="javascript:NewCal('datepicker','ddmmmyyyy',true,24)"><img src="resource/cal.gif" width="20" height="20" border="0" alt="Pick a date & time"></a><br>
</form>
</div>
<br>
<button id="drive_btn" class = "transparent_btn" type="button">Drive</button>
<button id="bike_btn" class = "transparent_btn" type="button">Bike</button>
<button id="walk_btn" class = "transparent_btn" type="button">Walk</button>
<button id="multi_btn" class = "transparent_btn" type="button">Transit</button>
<br>
<div id='permalink' style='display:inline-block;'></div>
</div>
<button id="elevation_btn" class = "transparent_btn" type="button">Elevation</button>
<button id="hidechart" name="hidebtn" type="button">Hide Chart</button>
<div class = "col-md-15" >
<div id="graph" style= "display:none; height:200px; width: 100%; position: bottom; float:center;"></div>
</div>
<hr>
<h4>Test File Route Testing</h4>
<input type="file" id="inputFile" onchange="selectFiles(this.files)" style="color:black"/>
<select id="fileSelector" class="select" style="width:38px; position:absolute;"></select><br><br>
<span style="color:black" class="load_desc">The test file samples <b>ie. demo_routes.txt</b> can be loaded from the test_requests directory in the tools repo.
<b>Note:</b>You cannot run Test File Routes and then click above to run Point & Click Route Test options. You must CLEAR ALL between testing sections.</span>
<br>
<!-- <div id="routeResponse" style="display:inline-block;">JSON Route Response Link</div>-->
<div id="route_inst" ng-bind-html="renderHtml(route_instructions)"></div>
<!--
<h5><b>What's New? </b><h5><h6><b>Perform multi-location routes</b></h6>
<h6>Point & click on map to place the origin. Press & hold the
ctrl key + click on map to add additional stops along your way. Finally, press & hold on the shift
key + click on your destination. Clear your routes by clicking the red 'Clear Routes' button. </h6>
-->
<div><br>
<button class="reset" ng-click="clearAll()"> clear all </button>
</div>
</div>
<div id="mapwrapper" class="col-md-10">
<div id="map"></div>
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script>
<script type="text/javascript" src="js/leaflet-hash.js"></script>
<script type="text/javascript" src="js/valhalla.js"></script>
<script type="text/javascript" src='dist/leaflet-routing-machine.js'></script>
<script type="text/javascript" src='dist/lrm-mapzen-patched.js'></script>
<script type="text/javascript" src="js/elevation/L.Elevation.js"></script>
<script type="text/javascript" src="js/locate/L.Locate.js"></script>
<script type="text/javascript" src="https://mapzen.com/js/mapzen.standalone.js"></script>
<!-- Load geocoding plugin after Leaflet -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-geocoder-mapzen/1.4.1/leaflet-geocoder-mapzen.js"></script>
<script>
var defaultMode = 'auto';
var road = L.tileLayer('https://b.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution : '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributers'
});
</script>
<!-- Adding a script block to post message to the parent container (think iframed demos) -->
<script type="text/javascript">
window.addEventListener("hashchange",function(){parent.postMessage(window.location.hash, "*")});
</script>
</body>
</html>