HeatmapLayer

@Composable
fun HeatmapLayer(    id: String,     source: Source,     sourceLayer: String = "",     minZoom: Float = 0.0f,     maxZoom: Float = 24.0f,     filter: Expression<BooleanValue> = nil(),     visible: Boolean = true,     color: Expression<ColorValue> = Defaults.HeatmapColors,     opacity: Expression<FloatValue> = const(1f),     radius: Expression<DpValue> = const(30.dp),     weight: Expression<FloatValue> = const(1f),     intensity: Expression<FloatValue> = const(1f),     onClick: FeaturesClickHandler? = null,     onLongClick: FeaturesClickHandler? = null)(source)

A heatmap layer draws points from the sourceLayer in the given source as a heatmap.

Parameters

id

Unique layer name.

source

Vector data source for this layer.

sourceLayer

Layer to use from the given vector tile source.

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].

filter

An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The featureState expression is not supported in filter expressions.

visible

Whether the layer should be displayed.

color

Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses heatmapDensity as input.

opacity

The global opacity at which the heatmap layer will be drawn.

radius

Radius of influence of one heatmap point. Increasing the value makes the heatmap smoother, but less detailed.

weight

A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering. A value in the range of [0..infinity).

intensity

Similar to weight but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.

onClick

Function to call when any feature in this layer has been clicked.

onLongClick

Function to call when any feature in this layer has been long-clicked.