Skip to content

heatmap_layer

Stable

Shows the density of points from a source as a heatmap.

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
source_id required string — ID of the data source
source_layer string nil Layer name in the source (for vector tiles)
paint map %{} Paint properties (heatmap-radius, heatmap-color, heatmap-weight, etc.)
filter any nil Filter expression to show subset of features
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
feature_state map nil a map of feature id => map of state, which paint properties read with feature-state