Re-route calculation possible?

Does the GraphHopper Directions API has the ability to “re-route” the user if they deviate from the directions? i.e. will it automatically update the set of directions or is there some function to determine if the user is still on/off track?

There is no such functionality offered directly via the Routing API, but you should be able to do this easily on the client side via calculating the distance to the route and fetch a new route depending on your requirements. E.g. for Java you could use this snippet to calculate the distance, and then do this for the first 100 points or only for points of the turn instructions.

This topic was automatically closed after 12 days. New replies are no longer allowed.