From 67ad8d94ee1d534a25783492b08fec98a95160f0 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Wed, 14 Mar 2018 13:08:54 -0400 Subject: [PATCH] added logic to set the correct costing. --- features/support/route.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/features/support/route.js b/features/support/route.js index 065f44bc3..d75ae3882 100644 --- a/features/support/route.js +++ b/features/support/route.js @@ -75,10 +75,17 @@ module.exports = function () { } if (this.osrmLoader.method === 'valhalla') { + + var val_costing = 'auto'; + if (this.profile === 'bicycle') + val_costing = 'bicycle'; + else if (this.profile === 'foot') + val_costing = 'pedestrian'; + params = { json: JSON.stringify({ locations: waypoints.map(w => {return{ lat: w.lat, lon: w.lon };}), - costing: 'auto', + costing: val_costing, directions_options:{ units:'miles'} }),