head/destination -> depart/arrive to reflect guidance API changes; minor fixes for roundabout tests

This commit is contained in:
Lauren Budorick
2016-03-29 13:55:02 -07:00
committed by Patrick Niklaus
parent 73050c0503
commit de2205cac7
21 changed files with 365 additions and 337 deletions
+11 -1
View File
@@ -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(',');
};