RouteRemovedListener

fun interface RouteRemovedListener

Used to inform the caller that a route has been removed from the navigation session.

The removed route could have been either the previously active route, which has been replaced with a new one, or a proposed route.

The previously active route is replaced with a new one when:

The proposed route is removed from the session when:

In order to listen to the route being removed from the session, implement this interface to create a listener, for instance:

val routeRemovedListener = RouteRemovedListener { route, reason ->
// Implement the necessary functionality for handling the route being removed from the session
}

Subsequently, add this listener using TomTomNavigation.addRouteRemovedListener. To stop listening to the route being removed from the session, remove the listener using TomTomNavigation.removeRouteRemovedListener.

The complementary listener that provides updates on the addition of routes to the session is RouteAddedListener. Note, during navigation in the turn by turn mode there will always be one active route. Therefore, any removal of the current active route will always be preceded by an ActiveRouteChangedListener call, with details of the new active route.

Functions

Link copied to clipboard
abstract fun onRouteRemoved(route: Route, reason: RouteRemovedReason)

Called whenever a route has been removed from the navigation session.