Skip to content

Commit d69c421

Browse files
update params sent to rail router
1 parent 356c46e commit d69c421

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/scenario-editor/utils/valhalla.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,12 @@ export function routeWithGraphHopper (
261261
key: graphHopperKey,
262262
vehicle: 'car',
263263
debug: true,
264-
type: 'json'
264+
type: 'json',
265+
profile: ''
266+
}
267+
if (snapToOption === 'RAIL') {
268+
delete params.vehicle // vehicle is not supported in current open rail router version
269+
params.profile = 'all_tracks' // this can be changed to return better results if needed
265270
}
266271
const locations = points.map(p => (`point=${p.lat},${p.lng}`)).join('&')
267272
// Avoiding motorways requires a POST request with a formatted body

0 commit comments

Comments
 (0)