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.-
Creates a
HybridRouteReplannerinstance.Declaration
Swift
public convenience init( onlineRoutePlanner: OnlineRoutePlanner, offlineRoutePlanner: OfflineRoutePlanner )Parameters
onlineRoutePlannerInstance of the streamed navigation-tiles route planner.
offlineRoutePlannerInstance of the offline map route planner.
-
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
optionsOptions 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
public func backToRoute(_ options: BackToRouteOptions) -> AsyncThrowingStream<Route, Error>Parameters
optionsOptions used to get a route update.
Return Value
an AsyncThrowingStream of Routes.
-
advanceGuidanceProgress(_:Asynchronous) Add more guidance instructions to the route if it doesn’t have enough of them. May result in
RouteReplanningReasonincrement.Throws
An error if async task is canceled.Declaration
Swift
public func advanceGuidanceProgress(_ options: RouteIncrementOptions) async throws -> RouteParameters
optionsParameters for a route replan.
Return Value
A
Routeupdated with the next instructions.
TomTom SDK for iOS (0.53.1)
HybridRouteReplanner