A vector layer for displaying heat maps. Create a new instance with the ALKMaps.Layer.HeatMap constructor.
| ALKMaps. | A vector layer for displaying heat maps. |
| Properties | |
| DEFAULT_GRADIENT | {Array<Step,Color>} Default gradient used to colorize the heat map |
| points | {Array<ALKMaps.LonLat>} List of points used to draw the heat map |
| pointRadius | {Number} Pixel radius used when drawing each of the points. |
| opacity | {Number} Opacity of the heat map. |
| colorGradient | {Array<Step,Color>} Gradient used to colorize the heat map. |
| renderers | {Array<String>} List of supported Renderer classes. |
| legendDisplayClass | {String} CSS class name can be used to override default style for the legend control. |
| legendControl | {DOMElement} Legend control. |
| externalDivForLegend | {DOMElement} The DOM element (DIV) that contains the legend control. |
| Constructor | |
| ALKMaps. | A class for heat map layer. |
| Functions | |
| setMap | Retrieve and set the height and width properties from the map, register the moveend event so that layer will update, and draw the layer. |
| destroy | Clean up the layer. |
| draw | Gathers the necessary tools and data, and passes it over to the renderer to be visualized. |
| createIntensityMask | Creates a radial gradient for each point on the layer. |
| getColorMap | Create the color map using the color gradient. |
| colorizeIntensityMask | Colorizes the intensity mask according to the color gradient. |
| setPoints | Set the points used to draw the heat map. |
| addPoints | Add points the existing heat map. |
| clearPoints | Clear the points being used to render the current heat map. |
| updateOptions | Update the optional settings for drawing the heat map. |
| setVisibility | Hide or show the legend control when the layer visibility is changed. |
A class for heat map layer.
| name | {String} Used to identify this layer. |
| options | {Object} Optional object whose properties will be set on the instance. |
| points | {Array<ALKMaps.LonLat>} List of points used to draw the heat map. |
| pointRadius | {Number} Pixel radius used when drawing each of the points. |
| opacity | {Number} Opacity of the heat map. |
| colorGradient | {Array<Step,Color>} Gradient used to colorize the heat map. |
var heatMapLayer = new ALKMaps.Layer.HeatMap("Heat Map");
var heatMapLayer = new ALKMaps.Layer.HeatMap("Heat Map", {
pointRadius: 8,
opacity: 1,
colorGradient: [
[0.2, "#0000ff"],
[0.5, "#00ffff"],
[0.6, "#00ff00"],
[0.95, "#ffff00"],
[1, "#ff0000"]
]
});
setMap: function ( map )
Retrieve and set the height and width properties from the map, register the moveend event so that layer will update, and draw the layer.
| map | {ALKMaps.Map} |
Retrieve and set the height and width properties from the map, register the moveend event so that layer will update, and draw the layer.
setMap: function ( map )
Clean up the layer.
destroy: function ()
Gathers the necessary tools and data, and passes it over to the renderer to be visualized.
draw: function ()
Creates a radial gradient for each point on the layer.
createIntensityMask: function ()
Create the color map using the color gradient.
getColorMap: function ()
Colorizes the intensity mask according to the color gradient.
colorizeIntensityMask: function ()
Set the points used to draw the heat map.
setPoints: function ( points )
Add points the existing heat map.
addPoints: function ( points )
Clear the points being used to render the current heat map.
clearPoints: function ()
Update the optional settings for drawing the heat map.
updateOptions: function ( params )
Hide or show the legend control when the layer visibility is changed.
setVisibility: function ( visibility )