RouteReplanner

public protocol RouteReplanner

Entry point to perform a route replanning action for dynamic use cases.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • The async awaits implementation. This method gets called when the route needs to be refreshed.

    Declaration

    Swift

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

    Parameters

    options

    Options used to get a route update.

    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

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

    Parameters

    options

    Options for back to route planning.

    Return Value

    an AsyncThrowingStream of Routes.

  • Adds another increment of guidance (instructions and lane guidance) to the route if the route guidance is not yet fully resolved. May result in RouteReplanningReason increment.

    Throws

    An error when the operation is cancelled.

    Declaration

    Swift

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

    Parameters

    options

    Parameters for a route replan.

    Return Value

    A result of replan operation.