NavigationVisualization

fun NavigationVisualization(infrastructure: NavigationVisualizationInfrastructure, state: NavigationVisualizationState = rememberNavigationVisualizationState(), onRouteClick: (RouteId) -> Unit = {}, onRouteStopClick: (RouteStopId) -> Unit = {}, content: @Composable NavigationVisualizationScope.() -> Unit = { })

Navigation visualization TomTomMap composable.

Example usages:

@Composable
fun MapScreen(
viewModel: MapScreenViewModel = viewModel()
) {
val mapViewState = rememberMapViewState()

TomTomMap(
infrastructure = viewModel.mapDisplayInfrastructure
state = mapViewState
) {
NavigationVisualization(
infrastructure = viewModel.navigationVisualizationInfrastructure
) {
TrafficVisualization(
state = rememberTrafficVisualizationState(trafficIncidentsEnabled = false)
)
BetterRouteVisualization(
state = rememberBetterRouteVisualizationState(enabled = true)
)
NavigationCameraManagement(
state = rememberNavigationCameraManagementState(enabled = true)
)
HorizonVisualization()
}
}
}

Important: Use named parameters to avoid ambiguous method calls due to API changes.

Parameters

infrastructure

The infrastructure of the NavigationVisualization Composable.

state

The state of routing visualization composable.

onRouteClick

Route click callback. The callback is provided with the RouteId of the route.

onRouteStopClick

Route stop click callback. The callback is provided with the RouteStopId of the route stop.

content

One ore more composable that extend the NavigationVisualizationScope. Each composable configures a part of the navigation visualization.

See also