From 613c1ba234432cee94ad68f9478e7b60e2dc06e5 Mon Sep 17 00:00:00 2001 From: Christian Beiwinkel Date: Thu, 22 Dec 2022 17:33:20 +0100 Subject: [PATCH] added manoeuvre numbering --- app/assets/javascripts/index/directions/valhalla.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/index/directions/valhalla.js b/app/assets/javascripts/index/directions/valhalla.js index 1e424caba..2b946b783 100644 --- a/app/assets/javascripts/index/directions/valhalla.js +++ b/app/assets/javascripts/index/directions/valhalla.js @@ -73,13 +73,13 @@ function ValhallaEngine(id, costing) { line = line.concat(legLine); - leg.maneuvers.forEach(function (manoeuvre) { + leg.maneuvers.forEach(function (manoeuvre, idx) { var point = legLine[manoeuvre.begin_shape_index]; steps.push([ { lat: point[0], lng: point[1] }, INSTR_MAP[manoeuvre.type], - manoeuvre.instruction, + "" + (idx + 1) + ". " + manoeuvre.instruction, manoeuvre.length * 1000, [] ]); -- 2.39.5