HeatmapLayer

fun HeatmapLayer(sourceState: SourceState, layerId: String = remember { generateRandomLayerId("heatmap") }, heatmapColor: HeatmapColor = HeatmapColor.default, heatmapIntensity: HeatmapIntensity = HeatmapIntensity.default, heatmapIntensityTransition: Transition = Transition.default, heatmapOpacity: HeatmapOpacity = HeatmapOpacity.default, heatmapOpacityTransition: Transition = Transition.default, heatmapRadius: HeatmapRadius = HeatmapRadius.default, heatmapRadiusTransition: Transition = Transition.default, heatmapWeight: HeatmapWeight = HeatmapWeight.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

A heatmap.

See also

Parameters

sourceState

the source that drives this layer.

layerId

the ID of the layer, by default, a random id will be generated with UUID.

heatmapColor

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

heatmapIntensity

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

heatmapOpacity

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

heatmapRadius

Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. queryRenderedFeatures on heatmap layers will return points within this radius.

heatmapWeight

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.

visibility

Whether this layer is displayed.

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

sourceLayer

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

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 ["feature-state", ...] expression is not supported in filter expressions. The ["pitch"] and ["distance-from-center"] expressions are supported only for filter expressions on the symbol layer.