Package-level declarations

Types

Link copied to clipboard
data class ComposeMapInitOptions(val mapOptions: MapOptions, val textureView: Boolean = false, val antialiasingSampleCount: Int = DEFAULT_ANTIALIASING_SAMPLE_COUNT, val mapName: String = "")

Defines configuration ComposeMapInitOptions for a MapboxMap composable function.

Link copied to clipboard

Marks a composable function as being expected to be used inside another composable function that is also marked or inferred to be marked as a MapboxMapComposable.

Link copied to clipboard

A MapboxMapScope provides a scope for the children of MapboxMap.

Link copied to clipboard

Marks the scope of DSL used within MapboxMap composable function.

Link copied to clipboard

The MapState that can be hoisted to observe map events, query rendered features and control gestures settings.

Functions

Link copied to clipboard

DisposableMapEffect is a DisposableEffect that provides the raw map controller. Use this API to interact with all the raw Mapbox Maps SDK APIs.

Link copied to clipboard
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.

Link copied to clipboard
fun MapEffect(key1: Any?, block: suspend CoroutineScope.(MapView) -> Unit)

When MapEffect enters the composition it will launch block into the composition's CoroutineContext. The coroutine will be cancelled and re-launched when MapEffect is recomposed with a different key1.

fun MapEffect(vararg keys: Any?, block: suspend CoroutineScope.(MapView) -> Unit)

When MapEffect enters the composition it will launch block into the composition's CoroutineContext. The coroutine will be cancelled and re-launched when MapEffect is recomposed with any different keys.

fun MapEffect(key1: Any?, key2: Any?, block: suspend CoroutineScope.(MapView) -> Unit)

When MapEffect enters the composition it will launch block into the composition's CoroutineContext. The coroutine will be cancelled and re-launched when MapEffect is recomposed with a different key1 or key2.

fun MapEffect(key1: Any?, key2: Any?, key3: Any?, block: suspend CoroutineScope.(MapView) -> Unit)

When MapEffect enters the composition it will launch block into the composition's CoroutineContext. The coroutine will be cancelled and re-launched when MapEffect is recomposed with a different key1, key2 or key3.

Link copied to clipboard
inline fun rememberMapState(key: String? = null, crossinline init: MapState.() -> Unit = {}): MapState

Create and rememberSaveable a MapState using MapState.Saver. init will be called when the MapState is first created to configure its initial state.