We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51fb4b0 + 9d372ad commit b365b3eCopy full SHA for b365b3e
src/controls/instructions.js
@@ -38,6 +38,7 @@ export default class Instructions {
38
39
if (directions.length && shouldRender) {
40
const direction = this.directions = directions[routeIndex];
41
+ const allSteps = direction.legs.reduce((legs, leg) => legs.concat(leg.steps), []);
42
43
if (compile) {
44
direction.legs.forEach(function(leg) {
@@ -50,7 +51,7 @@ export default class Instructions {
50
51
this.container.innerHTML = instructionsTemplate({
52
routeIndex,
53
routes: directions.length,
- steps: direction.legs[0].steps, // Todo: Respect all legs,
54
+ steps: allSteps,
55
format: utils.format[unit],
56
duration: utils.format[unit](direction.distance),
57
distance: utils.format.duration(direction.duration)
0 commit comments