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

Mapbox directions API using own route #118

Open uokesita opened 6 years ago

uokesita commented 6 years ago

I'm trying to make a react-native application for cyclists; I have some routes (coordinates) in a separate file that the cyclist can use.

I need to make Direction API requests that are bounded to those routes.

I know I can add waypoints to a request, but those would be "required" stops in the route. I need the API to use the waypoints as some references of "ideal" waypoints.

For example, in the image, the lines in red are the one I have stored, and the purple line is the Directions given by the API. I would like the API to use the circled stretch instead.

Is it possible to do it with Mapbox API or any other way? can I use any other tool for generating the route I need?

Ksen17 commented 5 years ago

Working on the same problem in another context Have you found a solution?