MapRuntime

Creates maps and snapshotters that share configuration and resources.

Closing a map or snapshotter leaves this runtime and its other children open.

On MapLibre Native platforms, a long operation can delay other work on this runtime. A fatal runtime failure closes all its maps and snapshotters. Use separate runtimes when their work must run independently.

Properties

Link copied to clipboard

Returns true after close marks this runtime as closed.

Link copied to clipboard

The offline packs and ambient cache that belong to this runtime.

Functions

Link copied to clipboard
suspend fun awaitClosed()

Waits until every child and shared resource has finished cleanup.

Link copied to clipboard
fun close()

Marks this runtime as closed and starts child and shared-resource cleanup.

Link copied to clipboard
fun createMapState(baseStyle: BaseStyle, cameraPosition: CameraPosition = CameraPosition(), content: @Composable () -> Unit = {}): MapState

Creates a logical map with baseStyle and the sources, layers, and images that content declares. The caller must close the result.

Link copied to clipboard
fun createSnapshotter(baseStyle: BaseStyle, content: @Composable () -> Unit = {}): MapSnapshotter

Creates an independent non-UI map with baseStyle and the sources, layers, and images that content declares, for image capture. The caller must close the result.

Link copied to clipboard
open override fun toString(): String