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

    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

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

    Parameters

    options

    BackToRouteOptions.

    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.

    Declaration

    Swift

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

    Parameters

    options

    Parameters for a route replan.

    Return Value

    A result of replan operation.