DefaultRouteOverviewViewModel

class DefaultRouteOverviewViewModel(map: Map, navigationManager: NavigationManager) : RouteOverviewViewModel

Manages route overview mode by positioning camera to fit remaining route geometry.

Provides real-time route statistics. Exits overview mode when navigation ends or camera behavior changes.

Constructors

Link copied to clipboard
constructor(map: Map, navigationManager: NavigationManager)

Properties

Link copied to clipboard
open override val routeOverviewInfo: StateFlow<RouteOverviewInfo?>

Observable state containing current route overview information. Provides remaining distance and duration, updated in real-time during overview mode. Null when route overview is not active.

Functions

Link copied to clipboard
open override fun close()

Close route overview mode.

Link copied to clipboard
open override fun continueTrip()

Close route overview mode and restores normal navigation camera behavior.

Link copied to clipboard
open override fun onCleared()

Cleans up all resources and connections when the ViewModel is no longer needed. This includes closing navigation data connections and camera behavior monitoring. Must be called to prevent memory leaks.

Link copied to clipboard
open override fun show(padding: Padding)

Activates route overview mode, adjusting the camera to show the route.