@@ -194,11 +194,11 @@ function handleCommonParams(query: any, options: any, format: Format) {
194
194
}
195
195
196
196
if ( query . skip_waypoints ) {
197
- options . skip_waypoints = query . skip_waypoints === 'true' ? true : false ;
197
+ options . skip_waypoints = query . skip_waypoints ;
198
198
}
199
199
200
200
if ( query . continue_straight ) {
201
- options . continue_straight = query . continue_straight === 'true' ? true : false ;
201
+ options . continue_straight = query . continue_straight ;
202
202
}
203
203
}
204
204
@@ -226,7 +226,7 @@ async function handleTrip(osrm: any, coordinates: [number, number][], query: any
226
226
} ;
227
227
handleCommonParams ( query , options , format ) ;
228
228
if ( query . roundtrip ) {
229
- options . roundtrip = query . roundtrip === 'true' ? true : false ;
229
+ options . roundtrip = query . roundtrip ;
230
230
}
231
231
if ( query . source ) {
232
232
options . source = query . source ;
@@ -244,7 +244,8 @@ async function handleRoute(osrm: any, coordinates: [number, number][], query: an
244
244
} ;
245
245
handleCommonParams ( query , options , format ) ;
246
246
if ( query . alternatives ) {
247
- options . alternatives = query . alternatives === 'true' ? true : false ;
247
+ // TODO: number ?
248
+ options . alternatives = query . alternatives ;
248
249
}
249
250
if ( query . approaches ) {
250
251
options . approaches = query . approaches . split ( ';' ) ;
@@ -373,7 +374,7 @@ async function main() {
373
374
return processRequest ( handleTrip , request , reply ) ;
374
375
} ) ;
375
376
376
- fastify . get ( '/tile/v1/:profile/tile(:x,:y,:zoom).mvt' , { schema : tileSchema } async ( request , reply ) => {
377
+ fastify . get ( '/tile/v1/:profile/tile(:x,:y,:zoom).mvt' , { schema : tileSchema } , async ( request , reply ) => {
377
378
const { x, y, zoom } = request . params as any ;
378
379
379
380
reply . type ( 'application/x-protobuf' ) . code ( 200 ) ;
0 commit comments