Skip to content

background_layer

Stable

Paints the map background with a colour or a pattern.

Generated from the component's definition in the library, so it always matches the version this demo runs.

Attribute Type Default Description
id required string — Unique identifier for the layer
map_id required string — ID of the map to attach to
paint map %{} Paint properties (background-color, background-opacity, background-pattern)
layout map %{} Layout properties (visibility)
min_zoom integer nil Minimum zoom level for layer visibility
max_zoom integer nil Maximum zoom level for layer visibility
before_id string nil ID of layer to insert this layer before
events any [] a list of event names, or :all