HeatMapLayerOptions interface
Options used when rendering Point objects in a HeatMapLayer.
- Extends
Properties
| color | Specifies the color gradient used to colorize the pixels in the heatmap.
This is defined using an expression that uses |
| filter | An expression specifying conditions on source features. Only features that match the filter are displayed. |
| intensity | Similar to |
| max |
An integer specifying the maximum zoom level to render the layer at.
This value is exclusive, i.e. the layer will be visible at |
| min |
An integer specifying the minimum zoom level to render the layer at.
This value is inclusive, i.e. the layer will be visible at |
| opacity | The opacity at which the heatmap layer will be rendered defined as a number between 0 and 1.
Default |
| radius | The radius in pixels used to render a data point on the heatmap.
The radius must be a number greater or equal to 1.
Default |
| source | The id or instance of a data source which the layer will render. |
| source |
Required when the source of the layer is a VectorTileSource. A vector source can have multiple layers within it, this identifies which one to render in this layer. Prohibited for all other types of sources. |
| visible | Specifies if the layer is visible or not.
Default |
| weight | Specifies how much an individual data point contributes to the heatmap.
Must be a number greater than 0. A value of 5 would be equivalent to having 5 points of weight 1 in the same spot.
This is useful when clustering points to allow heatmap rendering or large datasets.
Default |
Property Details
color
Specifies the color gradient used to colorize the pixels in the heatmap.
This is defined using an expression that uses ["heatmap-density"] as input.
Default ["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"]
color?: Expression
Property Value
filter
An expression specifying conditions on source features. Only features that match the filter are displayed.
filter?: Expression
Property Value
intensity
Similar to heatmap-weight but specifies the global heatmap intensity.
The higher this value is, the more ‘weight’ each point will contribute to the appearance.
Default 1
intensity?: number | Expression
Property Value
number | Expression
maxZoom
An integer specifying the maximum zoom level to render the layer at.
This value is exclusive, i.e. the layer will be visible at maxZoom > zoom >= minZoom.
Default 24.
maxZoom?: number
Property Value
number
minZoom
An integer specifying the minimum zoom level to render the layer at.
This value is inclusive, i.e. the layer will be visible at maxZoom > zoom >= minZoom.
Default 0.
minZoom?: number
Property Value
number
opacity
The opacity at which the heatmap layer will be rendered defined as a number between 0 and 1.
Default 1.
opacity?: number | Expression
Property Value
number | Expression
radius
The radius in pixels used to render a data point on the heatmap.
The radius must be a number greater or equal to 1.
Default 30.
radius?: number | Expression
Property Value
number | Expression
source
The id or instance of a data source which the layer will render.
source?: string | Source
Property Value
string | Source
sourceLayer
Required when the source of the layer is a VectorTileSource. A vector source can have multiple layers within it, this identifies which one to render in this layer. Prohibited for all other types of sources.
sourceLayer?: string
Property Value
string
visible
Specifies if the layer is visible or not.
Default true.
visible?: boolean
Property Value
boolean
weight
Specifies how much an individual data point contributes to the heatmap.
Must be a number greater than 0. A value of 5 would be equivalent to having 5 points of weight 1 in the same spot.
This is useful when clustering points to allow heatmap rendering or large datasets.
Default 1
weight?: number | Expression
Property Value
number | Expression