head/destination -> depart/arrive to reflect guidance API changes; minor fixes for roundabout tests
This commit is contained in:
committed by
Patrick Niklaus
parent
73050c0503
commit
de2205cac7
@@ -134,7 +134,17 @@ module.exports = function () {
|
||||
|
||||
this.turnList = (instructions) => {
|
||||
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
|
||||
.map(v => v.maneuver.type === 'depart' ? 'head' : v.maneuver.type === 'arrive' ? 'destination' : v.maneuver.modifier)
|
||||
.map(v => {
|
||||
switch (v.maneuver.type) {
|
||||
case 'depart':
|
||||
case 'arrive':
|
||||
return v.maneuver.type;
|
||||
case 'roundabout':
|
||||
return 'roundabout-exit-' + v.maneuver.exit;
|
||||
default:
|
||||
return v.maneuver.modifier
|
||||
}
|
||||
})
|
||||
.join(',');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user