GenericStyle

fun GenericStyle(style: String, slotsContent: SlotsContent = SlotsContent(), layerPositionedContent: LayerPositionedContent = LayerPositionedContent(), styleImportsConfig: StyleImportsConfig = StyleImportsConfig(), projection: Projection = Projection.default, atmosphereState: AtmosphereState = AtmosphereState.default, terrainState: TerrainState = TerrainState.initial)

Generic Style that you can insert MapboxMapComposable functions in any slot you defined as a plain string, or set any map import configs given as plain string and Value pairs.

Please note it's your own responsibility to make sure the slots you provided exists in the style, and the import configs are valid within the style, otherwise it will result in unexpected behaviour.

Always prefer strongly typed MapboxStyleComposable over the GenericStyle.

Parameters

style

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

slotsContent

The slots and their MapboxMapComposable that would be inserted to the corresponding slots in the style. You can use slotsContent to create it.

layerPositionedContent

The MapboxMapComposable content to be placed at specific layer position in the style. You can use layerPositionedContent to create it.

styleImportsConfig

The style import configurations for all the style imports in the style. You can use styleImportsConfig to create it.

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. Defaults to AtmosphereState.default meaning that atmosphere is the default defined in style definition.

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.