From: Christian Beiwinkel Date: Thu, 22 Dec 2022 16:33:20 +0000 (+0100) Subject: added manoeuvre numbering X-Git-Tag: live~1441^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/613c1ba234432cee94ad68f9478e7b60e2dc06e5 added manoeuvre numbering --- 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, [] ]);