Add stopgap for https://github.com/Project-OSRM/osrm-backend/pull/2159
This commit is contained in:
		
							parent
							
								
									126d2f85ac
								
							
						
					
					
						commit
						e5ebf74d76
					
				| @ -112,7 +112,10 @@ module.exports = function () { | |||||||
|         postfix = postfix || null; |         postfix = postfix || null; | ||||||
|         if (instructions) { |         if (instructions) { | ||||||
|             return instructions.legs.reduce((m, v) => m.concat(v.steps), []) |             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) |                 .map(keyFinder) | ||||||
|                 .join(','); |                 .join(','); | ||||||
|         } |         } | ||||||
| @ -131,7 +134,6 @@ module.exports = function () { | |||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     this.turnList = (instructions) => { |     this.turnList = (instructions) => { | ||||||
|         // console.log(instructions.legs[0].steps)
 |  | ||||||
|         return instructions.legs.reduce((m, v) => m.concat(v.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) |             .map(v => v.maneuver.type === 'depart' ? 'head' : v.maneuver.type === 'arrive' ? 'destination' : v.maneuver.modifier) | ||||||
|             .join(','); |             .join(','); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user