ModelLayer

fun ModelLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("model") }, modelLayerState: ModelLayerState = remember { ModelLayerState() })

A layer to render 3D Models.

This composable function inserts a ModelLayer to the map. For convenience, if there's no need to hoist the modelLayerState, use ModelLayer(sourceState, layerId, init) with trailing lambda instead.

Parameters

sourceState

the source that drives this layer.

layerId

the ID of the layer, by default, a random id will be generated with UUID.

modelLayerState

the state holder for ModelLayer's properties.


inline fun ModelLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("model") }, crossinline init: ModelLayerState.() -> Unit)

A layer to render 3D Models.

This composable function inserts a ModelLayer to the map.

Parameters

sourceState

the source that drives this layer.

layerId

the ID of the layer, by default, a random id will be generated with UUID.

init

the lambda that will be applied to the remembered ModelLayerState.