mapbox / mapbox-directions.js

Leaflet plugin for the Mapbox Directions API
https://www.mapbox.com/mapbox.js/example/v1.0.0/mapbox-directions/
ISC License
60 stars 23 forks source link

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

Open calebswank11 opened 7 years ago

calebswank11 commented 7 years ago

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!

danpat commented 7 years ago

@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

calebswank11 commented 7 years ago

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!

danpat commented 7 years ago

@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.