RouteOverviewViewModel

Manages the route overview mode during navigation. Route overview allows users to see the entire route on the map.

Thread Safety

This ViewModel is not thread-safe and must only be accessed from the Main thread.

  • All methods must be called from the Main (UI) thread

  • All StateFlow properties emit values on the Main thread

  • Concurrent access from multiple threads may lead to undefined behavior

Inheritors

Properties

Link copied to clipboard
abstract 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
abstract fun close()

Close route overview mode.

Link copied to clipboard
abstract fun continueTrip()

Close route overview mode and restores normal navigation camera behavior.

Link copied to clipboard
abstract fun onCleared()

Releases resources when the view model is no longer needed.

Link copied to clipboard
abstract fun show(padding: Padding)

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