NavigationRouteUpdateObserver

public protocol NavigationRouteUpdateObserver : Observer

Informs the caller that the current route has been updated.

The current route is updated under the following circumstances:

  • When the route data is refreshed with data from the replanned route.
  • When instructions and lane guidance are incrementally updated for the current route.

To receive notifications of a route being updated, first implement an observer object that conforms to NavigationRouteUpdateObserver, for example:

class RouteObserver: NavigationRouteUpdateObserver { ... }

In order to complete conformance, the observer object must implement the following callback:

func didUpdateRoute(route: reason:) {
    // add code here that handles the route being updated
}

Next, register this observer with navigation using TomTomNavigation/addRouteUpdateObserver(_:)`. To stop notifications of a route being updated, unregister the observer usingTomTomNavigation/removeRouteUpdateObserver(_:)“.

Please note that the NavigationRouteUpdateObserver is triggered only when the route is updated. It means that the route geometry is preserved. When a route update happens the active route does not change, therefore the NavigationActiveRouteChangeObserver is not called. To receive notifications of route changes that result in the geometry change, refer to the NavigationRouteAddObserver, NavigationRouteRemoveObserver and the NavigationActiveRouteChangeObserver.

Important

This is a Public Preview API. It may be changed or removed at any time.