planRoute

Synchronously plans a route and its alternative routes using the provided RoutePlanningOptions object. If the call succeeds, returns a RoutePlanningResponse. If it fails, returns a RoutingFailure.

Return

If the call succeeds, returns a RoutePlanningResponse. If it fails, returns a RoutingFailure.

Parameters

routePlanningOptions

The object containing the route options needed to plan a route.


abstract fun planRoute(routePlanningOptions: RoutePlanningOptions, callback: RoutePlanningCallback): Cancellable

Asynchronously plans a route and its alternative routes using the provided RoutePlanningOptions object and returns the planned route in the RoutePlanningCallback.

Return

cancellable operation.

Parameters

routePlanningOptions

The object containing the routing options needed to plan a route.

callback

The RoutePlanningCallback invoked after each route has been planned and when planning of all routes has finished, either successfully or with an error. The callback will be executed on the main thread.