BackgroundLayer

@Composable
fun BackgroundLayer(id: String, minZoom: Float = 0.0f, maxZoom: Float = 24.0f, visible: Boolean = true, opacity: Expression<FloatValue> = const(1f), color: Expression<ColorValue> = const(Color.Black), pattern: Expression<ImageValue> = nil())(source)

The background layer just draws the map background, by default, plain black.

Parameters

id

Unique layer name.

minZoom

The minimum zoom level for the layer. At zoom levels less than this, the layer will be hidden. A value in the range of [0..24].

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than this, the layer will be hidden. A value in the range of [0..24].

visible

Whether the layer should be displayed.

opacity

Background opacity. A value in range [0..1].

color

Background color.

Ignored if pattern is specified.

pattern

Image to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.