Type Alias HeatmapLayerSpecification
filter?: FilterSpecification;
id: string;
layout?: { visibility?: VisibilitySpecification };
maxzoom?: number;
metadata?: unknown;
minzoom?: number;
paint?: {
"heatmap-color"?: ExpressionSpecification;
"heatmap-intensity"?: PropertyValueSpecification<number>;
"heatmap-intensity-transition"?: TransitionSpecification;
"heatmap-opacity"?: PropertyValueSpecification<number>;
"heatmap-opacity-transition"?: TransitionSpecification;
"heatmap-radius"?: DataDrivenPropertyValueSpecification<number>;
"heatmap-radius-transition"?: TransitionSpecification;
"heatmap-weight"?: DataDrivenPropertyValueSpecification<number>;
};
source: string;
"source-layer"?: string;
type: "heatmap";
}
Properties
Optionalfilter
id
Unique layer name.
Optionallayout
Layout properties for the layer.
Type Declaration
Optionalvisibility?: VisibilitySpecificationWhether this layer is displayed.
Optionalmaxzoom
The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
Optionalmetadata
Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'maplibre:'.
Optionalminzoom
The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.
Optionalpaint
"heatmap-color"?: ExpressionSpecification;
"heatmap-intensity"?: PropertyValueSpecification<number>;
"heatmap-intensity-transition"?: TransitionSpecification;
"heatmap-opacity"?: PropertyValueSpecification<number>;
"heatmap-opacity-transition"?: TransitionSpecification;
"heatmap-radius"?: DataDrivenPropertyValueSpecification<number>;
"heatmap-radius-transition"?: TransitionSpecification;
"heatmap-weight"?: DataDrivenPropertyValueSpecification<number>;
}
Default paint properties for this layer.
Type Declaration
Optionalheatmap-color?: ExpressionSpecificationDefines the color of each pixel based on its density value in a heatmap. Should be an expression that uses
["heatmap-density"]as input.Optionalheatmap-intensity?: PropertyValueSpecification<number>Similar to
heatmap-weightbut controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.Optionalheatmap-intensity-transition?: TransitionSpecificationOptionalheatmap-opacity?: PropertyValueSpecification<number>The global opacity at which the heatmap layer will be drawn.
Optionalheatmap-opacity-transition?: TransitionSpecificationOptionalheatmap-radius?: DataDrivenPropertyValueSpecification<number>Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.
Optionalheatmap-radius-transition?: TransitionSpecificationOptionalheatmap-weight?: DataDrivenPropertyValueSpecification<number>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.
source
Name of a source description to be used for this layer. Required for all layer types except background.
Optionalsource-layer
Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.
A 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-stateexpression is not supported in filter expressions.