getRoute abstract method

Future<Route> getRoute(
  1. Coordinates origin,
  2. Coordinates destination, {
  3. MapProvider? provider,
})

Returns a Route between origin and destination.

provider overrides the default active provider for this call.

Throws NoRouteFoundException when no route exists between the two coordinates. Throws ScopeViolationException when a coordinate is outside the active scope. Throws MapServiceException on provider error or timeout.

Implementation

Future<Route> getRoute(
  Coordinates origin,
  Coordinates destination, {
  MapProvider? provider,
});