TomTomMap

fun TomTomMap(infrastructure: MapDisplayInfrastructure, state: MapViewState, modifier: Modifier = Modifier, onMapLongClick: (GeoPoint) -> Unit = { }, onMapClick: (GeoPoint) -> Unit = { }, onMapDoubleClickListener: (GeoPoint) -> Unit = { }, onMapReady: () -> Unit = { }, onMapPanningListener: () -> Unit = { }, content: @Composable () -> Unit = { })

A compose container for displaying a map.

See MapSemanticProperties and MapSemanticActions for custom SemanticsProperties and SemanticsActions to facilitate testing.

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

Parameters

infrastructure

The map display infrastructure.

state

The state of the map view which can be hoisted. The state can be used to change the map configuration, control the camera and access map elements

modifier

Modifier to be applied to the TomTomMap.

onMapLongClick

A lambda invoked when the map is long-pressed. Receives the GeoPoint of the event.

onMapClick

A lambda invoked when the map is clicked. Receives the GeoPoint of the event.

onMapDoubleClickListener

A lambda invoked when the map is double-clicked. Receives the GeoPoint of the event.

onMapReady

A lambda that is invoked when the map loaded successfully.

onMapPanningListener

A lambda invoked whenever the map is panned.

content

Composable content to be displayed on top of the map (e.g., compass, current location button).