]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions/valhalla.js
added manoeuvre numbering
[rails.git] / app / assets / javascripts / index / directions / valhalla.js
index 1e424caba884ca188302f2542a45c4b4463534a9..2b946b783119eaa1f674a29bb30281b0eca1cd90 100644 (file)
@@ -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,
+                  "<b>" + (idx + 1) + ".</b> " + manoeuvre.instruction,
                   manoeuvre.length * 1000,
                   []
                 ]);