StandaloneRouteProgressEngine
public final class StandaloneRouteProgressEngine : RouteProgressEngine
Responsible for calculating route progress in a standalone manner.
The purpose is to calculate and provide updates on the progress of the navigated route based on NavigationSnapshot.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes an instance of
StandaloneRouteProgressEngine.Declaration
Swift
public convenience init()
-
Calculates the progress for each route in the navigation snapshot.
This method takes a
navigationSnapshotand calculates the progress for each route within it. It returns a dictionary mapping route IDs to their respectiveRouteProgress.Throws
An error if progress calculation fails.Declaration
Swift
public func calculateProgress(navigationSnapshot: NavigationSnapshot) throws -> [UUID : RouteProgress]Parameters
navigationSnapshotThe snapshot of the current navigation state.
Return Value
A dictionary mapping route IDs to their respective
RouteProgress. -
Resets the state of the
StandaloneRouteProgressEngine.Declaration
Swift
public func reset()
TomTom SDK for iOS (0.71.1)
StandaloneRouteProgressEngine