NavigationRouteTrackingStateUpdateObserver

public protocol NavigationRouteTrackingStateUpdateObserver : Observer

Declares an observer that can receive route tracking state updates.

The information about the route state is represented by TomTomSDKNavigationEngines/RouteTrackingState. When the driver deviates or returns to the active route, the navigation engine sends route-tracking state updates to the observer.

To be notified about the route state update while navigating, first implement the NavigationRouteTrackingStateUpdateObserver protocol:

class CustomNavigationRouteTrackingStateUpdateObserver: NavigationRouteTrackingStateUpdateObserver {
    func didUpdateRouteTrackingState(routeTrackingState: RouteTrackingState) {
        // Add code here that handles the route state update.
    }
}

To start receiving route tracking state updates, become an observer using TomTomSDKNavigation/TomTomNavigation/addRouteTrackingStateUpdateObserver(_:): To stop receiving route tracking state updates, remove the previously added observer using TomTomSDKNavigation/TomTomNavigation/removeRouteTrackingStateUpdateObserver(_:):