MapboxMap

fun MapboxMap(modifier: Modifier = Modifier, mapEvents: MapEvents? = null, mapInitOptionsFactory: (Context) -> MapInitOptions = { context -> MapInitOptions(context) }, attributionSettings: AttributionSettings = DefaultSettingsProvider.defaultAttributionSettings( LocalContext.current ), compassSettings: CompassSettings = DefaultSettingsProvider.defaultCompassSettings( LocalContext.current ), gesturesSettings: GesturesSettings = DefaultSettingsProvider.defaultGesturesSettings, locationComponentSettings: LocationComponentSettings = DefaultSettingsProvider.defaultLocationComponentSettings( LocalContext.current ), logoSettings: LogoSettings = DefaultSettingsProvider.defaultLogoSettings( LocalContext.current ), scaleBarSettings: ScaleBarSettings = DefaultSettingsProvider.defaultScaleBarSettings( LocalContext.current ), mapViewportState: MapViewportState = rememberMapViewportState(), onMapClickListener: OnMapClickListener = DefaultSettingsProvider.defaultOnClickListener, onMapLongClickListener: OnMapLongClickListener = DefaultSettingsProvider.defaultOnLongClickListener, 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.

mapInitOptionsFactory

Defines the initialisation configurations factory for a MapboxMap. It can only be set once and not mutable after the initialisation. Mutating the MapInitOptions during recomposition will result in a IllegalStateException.

attributionSettings

Settings for showing the attribution icon on the map.

compassSettings

Settings for showing the compass icon on the map.

gesturesSettings

Gesture configuration allows to control the user touch interaction.

locationComponentSettings

Settings for showing a location puck on the map.

logoSettings

Settings for showing the Mapbox logo on the map.

scaleBarSettings

Settings for showing the scale bar on the map.

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.

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.

content

The content of the map.