TileLayer

fun TileLayer(layerId: String, options: LayerOptions = LayerOptions(), active: Boolean = true, styleId: Int = 0, style: String? = null, onLayerLoaded: () -> Unit? = null, onDataSourceUpdated: (BaseDataSource) -> Unit? = null, createTileDataSource: (builder: TileDataSourceBuilder) -> Unit)

Adds a custom tile layer for as long as this composable stays in the composition.

layerId identifies the layer among the layers of the map and picks its place in the render order; changing it replaces the layer. createTileDataSource is called once per layer, so the data source it configures does not follow later recompositions.

Parameters

style

JSON style transformation applied to the layer, keyed by styleId.