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

Utility that provides the default values of the Settings for each plugin.

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
class MapEvents(val onMapLoaded: MapLoadedCallback? = null, val onMapIdle: MapIdleCallback? = null, val onMapLoadingError: MapLoadingErrorCallback? = null, val onStyleLoaded: StyleLoadedCallback? = null, val onStyleDataLoaded: StyleDataLoadedCallback? = null, val onSourceDataLoaded: SourceDataLoadedCallback? = null, val onSourceAdded: SourceAddedCallback? = null, val onSourceRemoved: SourceRemovedCallback? = null, val onStyleImageMissing: StyleImageMissingCallback? = null, val onStyleImageRemoveUnused: StyleImageRemoveUnusedCallback? = null, val onCameraChanged: CameraChangedCallback? = null, val onRenderFrameStarted: RenderFrameStartedCallback? = null, val onRenderFrameFinished: RenderFrameFinishedCallback? = null, val onResourceRequest: ResourceRequestCallback? = null)

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

Functions

Link copied to clipboard
fun MapboxMap(modifier: Modifier = Modifier, mapEvents: MapEvents? = null, composeMapInitOptions: ComposeMapInitOptions = ComposeMapInitOptions(LocalDensity.current.density), gesturesSettings: GesturesSettings = GesturesSettings { }, locationComponentSettings: LocationComponentSettings = DefaultSettingsProvider.defaultLocationComponentSettings( LocalDensity.current.density ), compass: @Composable MapCompassScope.() -> Unit = { Compass() }, scaleBar: @Composable MapScaleBarScope.() -> Unit = { ScaleBar() }, logo: @Composable MapLogoScope.() -> Unit = { Logo() }, attribution: @Composable MapAttributionScope.() -> Unit = { Attribution() }, mapViewportState: MapViewportState = rememberMapViewportState(), onMapClickListener: OnMapClickListener = DefaultSettingsProvider.defaultOnClickListener, onMapLongClickListener: OnMapLongClickListener = DefaultSettingsProvider.defaultOnLongClickListener, 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.