RoutingApi

interface RoutingApi : Disposable

Entry point to perform a route planning action.

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

Functions

Link copied to clipboard
abstract fun dispose()
Link copied to clipboard
abstract fun incrementRouteContents(routeIncrementOptions: RouteIncrementOptions): Result<Route, RoutingError>

Synchronously calculates route contents (instructions, lane guidance) within its certain part using the provided RouteIncrementOptions object. If the call succeeds, returns a Route. If it fails, returns a RoutingError.

Link copied to clipboard
abstract fun planRoute(routePlanningOptions: RoutePlanningOptions): Result<RoutePlanningResult, RoutingError>

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

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.