| 312 | } |
| 313 | |
| 314 | intersectionList(instructions) { |
| 315 | return instructions.legs |
| 316 | .reduce((m, v) => m.concat(v.steps), []) |
| 317 | .map((v) => { |
| 318 | return v.intersections |
| 319 | .map((intersection) => { |
| 320 | let string = `${intersection.entry[0]}:${intersection.bearings[0]}`, |
| 321 | i; |
| 322 | for (i = 1; i < intersection.bearings.length; ++i) |
| 323 | string = `${string} ${intersection.entry[i]}:${intersection.bearings[i]}`; |
| 324 | return string; |
| 325 | }) |
| 326 | .join(','); |
| 327 | }) |
| 328 | .join(';'); |
| 329 | } |
| 330 | |
| 331 | modeList(instructions) { |
| 332 | return this.extractInstructionList(instructions, (s) => s.mode); |