MapStyle

fun MapStyle(style: String, styleImportsContent: @Composable StyleImportsScope.() -> Unit? = null, styleState: StyleState = rememberStyleState())

A simple composable function to set the style to the map without slots or import configs.

Parameters

style

The Style JSON or Style Uri to be set to the map.

styleImportsContent

The style imports to be added to the current style, note layers and annotations shouldn't be added to this block.

styleState

The state holder for the Style.


fun MapStyle(style: String, styleImportsContent: @Composable StyleImportsScope.() -> Unit? = null, projection: Projection = Projection.INITIAL, atmosphereState: AtmosphereState = remember { AtmosphereState() }, terrainState: TerrainState = TerrainState.INITIAL, lightsState: LightsState = LightsState.INITIAL, styleTransition: TransitionOptions = remember { transition { } })

Deprecated

Use overloaded MapStyle composable function with StyleState

A simple composable function to set the style to the map without slots or import configs.

Parameters

style

The Style JSON or Style Uri to be set to the map.

styleImportsContent

The style imports to be added to the current style, note layers and annotations shouldn't be added to this block.

projection

The projection to be set to the map. Defaults to Projection.DEFAULT meaning that projection value is taken from the style definition.

atmosphereState

The atmosphere to be set to the map. By default, no changes to the current atmosphere.

terrainState

The terrain to be set to the map. Defaults to initial state meaning no custom terrain is added, default value is taken from style definition.

lightsState

The lights to be set to the map. By default, no changes to the current lights defined in style.

styleTransition

Transition options applied when loading the style.