getRoute method

Future<MPRoute> getRoute({
  1. required MPPoint origin,
  2. required MPPoint destination,
})

Queries the routing network to generate a route from the origin to the destination.

Can throw an MPError if unable to generate the route.

Implementation

Future<MPRoute> getRoute(
        {required MPPoint origin, required MPPoint destination}) =>
    DirectionsServicePlatform.instance.getRoute(origin, destination);