planRoute

abstract fun planRoute(routePlanningOptions: RoutePlanningOptions): Result<RoutePlanningResult, RoutingError>

Synchronously plans a route using the provided RoutePlanningOptions object. If the call succeeds, returns a RoutePlanningResult. If it fails, returns a RoutingError.

Important: This is a Public Preview API. It may be changed or removed at any time.

Return

If the call succeeds, returns a RoutePlanningResult. If it fails, returns a RoutingError.

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 using the provided RoutePlanningOptions object and returns the planned route in the RoutePlanningCallback.

Important: This is a Public Preview API. It may be changed or removed at any time.

Return

cancellable operation.

Parameters

routePlanningOptions

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

callback

The RoutePlanningCallback invoked when the routing operation has finished, either successfully or with an error. The callback will be executed in the main thread.