This commit is contained in:
Jeff Miccolis 2016-03-29 10:24:09 -04:00 committed by Patrick Niklaus
parent 598c78200f
commit a2612a1ebe

View File

@ -112,7 +112,10 @@ module.exports = function () {
postfix = postfix || null;
if (instructions) {
return instructions.legs.reduce((m, v) => m.concat(v.steps), [])
.filter(v => v.maneuver.type !== 'arrive')
.filter(v => {
// TODO distance check is stopgap for https://github.com/Project-OSRM/osrm-backend/pull/2159
return v.maneuver.type !== 'arrive' && v.distance > 0
})
.map(keyFinder)
.join(',');
}
@ -131,7 +134,6 @@ module.exports = function () {
};
this.turnList = (instructions) => {
// console.log(instructions.legs[0].steps)
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)
.join(',');