From 4fd68e3970636cc5fd358c12cf832a0f106ad01c Mon Sep 17 00:00:00 2001 From: Lauren Budorick Date: Wed, 30 Mar 2016 18:34:13 -0700 Subject: [PATCH] Fix route/bearing param --- features/support/route.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/features/support/route.js b/features/support/route.js index 71059e964..1a351c985 100644 --- a/features/support/route.js +++ b/features/support/route.js @@ -57,9 +57,11 @@ module.exports = function () { params.coordinates = encodedWaypoints; if (bearings.length) { - // TODOTODO - var encodedBearings = bearings.map(b => ['b', b.toString()]); - params = Array.prototype.concat.apply(params, encodedWaypoints.map((o, i) => [o, encodedBearings[i]])); + params.bearings = bearings.map(b => { + var bs = b.split(','); + if (bs.length === 2) return b; + else return b += ',10'; + }).join(';'); } return this.requestPath('route', params, callback);