new Heatmap(opt_options)
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fires:
-
change(module:ol/events/Event~Event) - Generic change event. Triggered when the revision counter is increased. -
change:blur(module:ol/Object.ObjectEvent) -
change:extent(module:ol/Object.ObjectEvent) -
change:gradient(module:ol/Object.ObjectEvent) -
change:maxResolution(module:ol/Object.ObjectEvent) -
change:minResolution(module:ol/Object.ObjectEvent) -
change:opacity(module:ol/Object.ObjectEvent) -
change:radius(module:ol/Object.ObjectEvent) -
change:source(module:ol/Object.ObjectEvent) -
change:visible(module:ol/Object.ObjectEvent) -
change:zIndex(module:ol/Object.ObjectEvent) -
postcompose(module:ol/render/Event~RenderEvent) -
precompose(module:ol/render/Event~RenderEvent) -
propertychange(module:ol/Object.ObjectEvent) - Triggered when a property is changed. -
render(module:ol/render/Event~RenderEvent) -
rendercomplete(module:ol/render/Event~RenderEvent) - Triggered when rendering is complete, i.e. all sources and tiles have finished loading for the current viewport, and all tiles are faded in.
Extends
Observable Properties
| Name | Type | Settable | ol/Object.ObjectEvent type | Description |
|---|---|---|---|---|
blur |
number | yes | change:blur |
Blur size in pixels. |
extent |
module:ol/extent~Extent | undefined | yes | change:extent |
The layer extent. |
gradient |
Array.<string> | yes | change:gradient |
Colors. |
maxResolution |
number | yes | change:maxresolution |
The maximum resolution of the layer. |
minResolution |
number | yes | change:minresolution |
The minimum resolution of the layer. |
opacity |
number | yes | change:opacity |
The opacity of the layer. |
radius |
number | yes | change:radius |
Radius size in pixel. |
source |
module:ol/source/Source~Source | yes | change:source |
The layer source (or |
visible |
boolean | yes | change:visible |
The visibility of the layer. |
zIndex |
number | yes | change:zindex |
The Z-index of the layer. |
Methods
-
getBlur(){number}
layer/Heatmap.js, line 196 -
Return the blur size in pixels.
Returns:
Blur size in pixels.
-
getGradient(){Array.<string>}
layer/Heatmap.js, line 206 -
Return the gradient colors as array of strings.
Returns:
Colors.
-
getRadius(){number}
layer/Heatmap.js, line 216 -
Return the size of the radius in pixels.
Returns:
Radius size in pixel.
-
Return the associated
vectorsourceof the layer.Returns:
Source.
-
Get the style for features. This returns whatever was passed to the
styleoption at construction or to thesetStylemethod.Returns:
Layer style.
-
getStyleFunction(){module:ol/style/Style~StyleFunction|undefined} inherited
layer/Vector.js, line 196 -
Get the style function.
Returns:
Layer style function.
-
setBlur(blur)
layer/Heatmap.js, line 262 -
Set the blur size in pixels.
Name Type Description blurnumber Blur size in pixels.
-
setGradient(colors)
layer/Heatmap.js, line 272 -
Set the gradient colors as array of strings.
Name Type Description colorsArray.<string> Gradient.
-
setRadius(radius)
layer/Heatmap.js, line 282 -
Set the size of the radius in pixels.
Name Type Description radiusnumber Radius size in pixel.
-
Set the style for features. This can be a single style object, an array of styles, or a function that takes a feature and resolution and returns an array of styles. If it is
undefinedthe default style is used. If it isnullthe layer has no style (anullstyle), so only features that have their own styles will be rendered in the layer. Seemodule:ol/stylefor information on the default style.Name Type Description stylemodule:ol/style/Style~Style | Array.<module:ol/style/Style~Style> | module:ol/style/Style~StyleFunction | null | undefined Layer style.
OpenLayers