MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / intersectionList

Method intersectionList

features/support/route.js:314–329  ·  view source on GitHub ↗
(instructions)

Source from the content-addressed store, hash-verified

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);

Callers 1

afterRequestMethod · 0.80

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected