DefaultNavigationControlsState

class DefaultNavigationControlsState(map: Map, navigationManager: NavigationManager, minimapState: MapComposableState? = null, isFreeRoamByDefault: Boolean = true) : NavigationControlsState

Default implementation of NavigationControlsState that creates and manages all navigation ViewModels with default implementations.

This class serves as a single point of creation and lifecycle management for all navigation-related ViewModels. It ensures proper initialization order and provides a clean way to pass dependencies to the UI layer.

Important: Call onCleared when navigation is finished to properly release resources and prevent memory leaks.

Parameters

map

The map instance for map-related operations

navigationManager

Manager for navigation state and route information

minimapState

Composable minimap state (optional)

isFreeRoamByDefault

Whether to start in free roam mode by default

See also

for the interface definition

Constructors

Link copied to clipboard
constructor(map: Map, navigationManager: NavigationManager, minimapState: MapComposableState? = null, isFreeRoamByDefault: Boolean = true)

Properties

Link copied to clipboard

ViewModel for better route suggestions that appear during navigation.

Link copied to clipboard

ViewModel that coordinates the visibility and state of all navigation controls.

Link copied to clipboard

ViewModel for the main navigation dashboard with audio controls and route information.

Link copied to clipboard

ViewModel for the finish route button shown when navigation is completed.

Link copied to clipboard

ViewModel for maneuver visualization showing upcoming turn.

Link copied to clipboard

ViewModel that manages the visibility and layout of map controls (zoom, compass, my location).

Link copied to clipboard

ViewModel that manages the visibility and layout of navigation message.

Link copied to clipboard

ViewModel for minimap visualization showing simplified map in circle.

Link copied to clipboard

ViewModel for route overview mode that allows users to see the entire route.

Link copied to clipboard

ViewModel displaying current speed, speed limit and camera warnings.

Link copied to clipboard

ViewModel for traffic line visualization showing traffic conditions and route objects.

Functions

Link copied to clipboard
open override fun onCleared()

Cleans up all ViewModels and releases resources. Must be called when navigation is finished or the screen is destroyed.