mapbox-directions.js icon indicating copy to clipboard operation
mapbox-directions.js copied to clipboard

get directions based upon user heading (N, S, E, W)

Open calebswank11 opened this issue 8 years ago • 3 comments

Hey all, I have read through all of your documentation and may have missed it, but cannot seem to find a way to get directions based upon device heading. Say I've just turned East onto a road and require Eastbound directions but the nearest default route starts heading West. Is there a option I can pass in order to force, for lack of a better term, East bound directions? Or at a minimum, is there a way to signal a U-turn based upon that information? Thanks and you guys are doing a wonderful job!

calebswank11 avatar Apr 26 '17 14:04 calebswank11

@calebswank11 Hmm, looks like this library is getting a bit rusty.

The Mapbox Directions API v5 supports a bearing parameter, but mapbox-directions.js has not yet been updated to support the V5 API.

See the direct HTTP REST docs for V5 here: https://www.mapbox.com/api-documentation/#retrieve-directions

danpat avatar Apr 26 '17 17:04 danpat

oh awesome, thanks @danpat! currently we don't have the ability to do anything other than Javascript. Do you guys happen to have an idea of when that will be updated so I can relay that onto my team?

Thanks again and I appreciate the response!

calebswank11 avatar Apr 27 '17 01:04 calebswank11

@calebswank11 I'll flag our team manager, but at the moment, there is nobody scheduled to work on this library. So many things to do, so little time....

As this is an open-source library though, feel free to submit a pull request - we'd gladly accept one.

danpat avatar May 10 '17 23:05 danpat