RouteReplanner

Interface providing methods for dynamic route replanning during navigation. The RouteReplanner is used by the RouteReplanningEngine to perform route replanning based on the NavigationSnapshot of the current navigation session. The RouteReplanningEngine determines when and which method of the RouteReplanner call.

The Navigation SDK provides com.tomtom.sdk.navigation.routereplanner.online.OnlineRouteReplannerFactory, com.tomtom.sdk.navigation.routereplanner.offline.OfflineRouteReplannerFactory and com.tomtom.sdk.navigation.routereplanner.hybrid.HybridRouteReplanner to create instances of the RouteReplanner for the selected mode.

Threading: The methods provided by the RouteReplanner should be called on a background thread as they involve time-consuming operations, such as network requests and offline route computation.

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

Functions

Link copied to clipboard

Plans a new route that leads to the destination. It is used when the user deviates from the current route or the language is changed. The newly planned route does not necessarily have to follow the same geometry as the active one if the user has deviated. However, if the active route was initially planned with supporting points, the route planning will consider the undriven part of the active route. This also applies when re-planning due to a language change.

Link copied to clipboard

Calculates route contents (instructions, lane guidance) for the first sequence of instructions following the last successful increment.

Link copied to clipboard

Updates a route using the provided NavigationSnapshot object. It is used for the continuous replanning of the active route during navigation. The RouteReplannerResponse contains the current route with updated dynamic properties, such as ETA and sections and the alternative route found, if any. The refreshed route is the first one in the RouteReplannerResponse.routes list.

Inherited functions

Link copied to clipboard
abstract fun close()