MapboxMap

fun MapboxMap(modifier: Modifier = Modifier, composeMapInitOptions: ComposeMapInitOptions = with(LocalDensity.current) { remember { ComposeMapInitOptions(density) } }, compass: @Composable MapCompassScope.() -> Unit = { Compass() }, scaleBar: @Composable MapScaleBarScope.() -> Unit = { ScaleBar() }, logo: @Composable MapLogoScope.() -> Unit = { Logo() }, attribution: @Composable MapAttributionScope.() -> Unit = { Attribution() }, mapViewportState: MapViewportState = rememberMapViewportState(), mapState: MapState = rememberMapState(), onMapClickListener: OnMapClickListener? = null, onMapLongClickListener: OnMapLongClickListener? = null, style: @Composable () -> Unit = { MapboxStandardStyle() }, content: @Composable MapboxMapScope.() -> Unit? = null)

Entry point for adding a Mapbox Map instance to the Jetpack Compose UI.

Parameters

modifier

Modifier to be applied to the Mapbox map.

composeMapInitOptions

Defines the initialisation configurations for a MapboxMap. It should only be set once and not mutated after the initialisation. Mutating the ComposeMapInitOptions will result in internal MapView recreation and impact performance.

compass

The Mapbox Compass ornament of the map, consider using MapCompassScope.Compass.

scaleBar

The Mapbox ScaleBar ornament of the map, consider using MapScaleBarScope.ScaleBar.

logo

The Mapbox Logo ornament of the map, consider using MapLogoScope.Logo.

attribution

The Mapbox Attribution ornament of the map, consider using MapAttributionScope.Attribution.

mapViewportState

A state object that can be hoisted to control and observe the map's camera state. A MapViewportState may only be used by a single MapboxMap composable at a time as it reflects instance state for a single view of a map.

mapState

A state object that can be hoisted to query map rendered features and gestures settings.

onMapClickListener

Callback to be invoked when the user clicks on the map view.

onMapLongClickListener

Callback to be invoked when the user long clicks on the map view.

style

The Style of the map.

content

The content of the map.