X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dd8a0f0dff457f27d6c6125a4f724f699d489588..ce52ba1e6ae4e5ae5fb03e64bde9c7df1dcae4ff:/app/assets/javascripts/index/directions/fossgis_valhalla.js diff --git a/app/assets/javascripts/index/directions/fossgis_valhalla.js b/app/assets/javascripts/index/directions/fossgis_valhalla.js index 7228f488d..7e20d02d6 100644 --- a/app/assets/javascripts/index/directions/fossgis_valhalla.js +++ b/app/assets/javascripts/index/directions/fossgis_valhalla.js @@ -45,16 +45,12 @@ function _processDirections(leg) { const line = L.PolylineUtil.decode(leg.shape, { precision: 6 }); - const steps = leg.maneuvers.map(manoeuvre => { - const lineseg = line - .slice(manoeuvre.begin_shape_index, manoeuvre.end_shape_index + 1); - return [ - INSTR_MAP[manoeuvre.type], - manoeuvre.instruction, - manoeuvre.length * 1000, - lineseg - ]; - }); + const steps = leg.maneuvers.map(manoeuvre => [ + INSTR_MAP[manoeuvre.type], + manoeuvre.instruction, + manoeuvre.length * 1000, + line.slice(manoeuvre.begin_shape_index, manoeuvre.end_shape_index + 1) + ]); return { line: line,