File tree 2 files changed +62
-1
lines changed
2 files changed +62
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,64 @@ const queryParams = [
163
163
default : true
164
164
} ,
165
165
166
+ {
167
+ /* walkTolerance -- simplified UI for walkReluctance */
168
+ name : "walkTolerance" ,
169
+ routingTypes : [ "ITINERARY" ] ,
170
+ applicable : query =>
171
+ query . mode &&
172
+ hasTransit ( query . mode ) && // Only applicable for transit+walk trips
173
+ query . mode . indexOf ( "WALK" ) !== - 1 ,
174
+ default : "2" ,
175
+ selector : "DROPDOWN" ,
176
+ label : "Walk Tolerance" ,
177
+ options : [
178
+ {
179
+ text : "More walking" ,
180
+ value : 1
181
+ } ,
182
+ {
183
+ text : "Normal walking" ,
184
+ value : 2
185
+ } ,
186
+ {
187
+ text : "Less walking" ,
188
+ value : 4
189
+ }
190
+ ] ,
191
+ itineraryRewrite : value => ( {
192
+ walkReluctance : value
193
+ } )
194
+ } ,
195
+
196
+ {
197
+ /* walkSpeed -- the user's walking speed in m/s */
198
+ name : "walkSpeed" ,
199
+ routingTypes : [ "ITINERARY" , "PROFILE" ] ,
200
+ default : 1.34 ,
201
+ selector : "DROPDOWN" ,
202
+ label : "Walk Speed" ,
203
+ applicable : query =>
204
+ ! query . otp2 &&
205
+ query . mode &&
206
+ ! hasTransit ( query . mode ) && // Only applicable for walk-only trips (see walkTolerance for transit+walk)
207
+ query . mode . indexOf ( "WALK" ) !== - 1 ,
208
+ options : [
209
+ {
210
+ text : "2 MPH" ,
211
+ value : 0.89
212
+ } ,
213
+ {
214
+ text : "3 MPH" ,
215
+ value : 1.34
216
+ } ,
217
+ {
218
+ text : "4 MPH" ,
219
+ value : 1.79
220
+ }
221
+ ]
222
+ } ,
223
+
166
224
{
167
225
/* maxWalkDistance - the maximum distance in meters the user will walk to transit. */
168
226
name : "maxWalkDistance" ,
@@ -365,6 +423,7 @@ const queryParams = [
365
423
}
366
424
]
367
425
} ,
426
+
368
427
{
369
428
name : "walkReluctance" ,
370
429
routingTypes : [ "ITINERARY" , "PROFILE" ] ,
@@ -382,6 +441,7 @@ const queryParams = [
382
441
*/
383
442
! ! query . otp2 && query . mode && query . mode . indexOf ( "WALK" ) !== - 1
384
443
} ,
444
+
385
445
{
386
446
/* maxBikeTime -- the maximum time the user will spend biking in minutes */
387
447
name : "maxBikeTime" ,
Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ import {
16
16
17
17
export const defaultParams = [
18
18
"wheelchair" ,
19
- "maxWalkDistance" ,
20
19
"walkReluctance" ,
20
+ "walkTolerance" ,
21
+ "walkSpeed" ,
21
22
"maxWalkTime" ,
22
23
"maxBikeDistance" ,
23
24
"maxBikeTime" ,
You can’t perform that action at this time.
0 commit comments