HybridRouteReplanner

public final class HybridRouteReplanner : RouteReplanner

The hybrid implementation for the RouteReplanner.

Important

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

Lifecycle

  • Initializer.

    Declaration

    Swift

    public convenience init(
        onlineRoutePlanner: OnlineRoutePlanner,
        offlineRoutePlanner: OfflineRoutePlanner
    )

    Parameters

    onlineRoutePlanner

    Instance of the streamed navigation-tiles route planner.

    offlineRoutePlanner

    Instance of the offline map route planner.

Public

  • The async awaits implementation. This method gets called when the route needs to be refreshed.

    Declaration

    Swift

    public func update(_ options: RouteUpdateOptions) -> AsyncThrowingStream<Route, Error>

    Parameters

    options

    RouteUpdateOptions.

    Return Value

    an AsyncThrowingStream of Routes.

  • The async awaits implementation. This method gets called each time there’s a deviation of the route.

    Declaration

    Swift

    public func backToRoute(_ options: BackToRouteOptions) -> AsyncThrowingStream<Route, Error>

    Parameters

    options

    BackToRouteOptions.

    Return Value

    an AsyncThrowingStream of Routes.

  • Add more guidance instructions to the route if it doesn’t have enough of them. May result in RouteReplanningReason increment.

    Declaration

    Swift

    public func advanceGuidanceProgress(_ options: RouteIncrementOptions) async throws -> Route

    Parameters

    parameters

    Parameters for a route replan.

    completion

    Completion block with a result of replan operation.