planRoute

abstract fun planRoute(routingOptions: RoutingOptions): Result<RoutingResult, RoutingError>

Synchronously plans a route using the provided RoutingOptions object. If the call succeeds, returns a RoutingResult. 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 RoutingResult. If it fails, returns a RoutingError.

Parameters

routingOptions

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


abstract fun planRoute(routingOptions: RoutingOptions, callback: RoutingCallback): Cancellable

Asynchronously plans a route using the provided RoutingOptions object and returns the planned route in the RoutingCallback.

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

Return

cancellable operation.

Parameters

routingOptions

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

callback

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