Mapbox Directions, custom route source

1.1k Views Asked by At

Is it possible to retreive from Mapbox Directions API, routes (for specified points) which are restricted to my own routes source ? Now I receive good routes, but in my case, I have my own layers with pathes and sometimes Mapbox gives me route which is not part of my layer on the map.

1

There are 1 best solutions below

0
Moritz On BEST ANSWER

It is not possible to restrict the Mapbox router (which is based upon OSRM) to a certain set of streets.

What you can do, is to use Mapbox Map Matching to retrieve a route that has a set of coordinates (which you can pass in the MapMatching request) as waypoints.