ALKMaps.Layer.HeatMap

A vector layer for displaying heat maps.  Create a new instance with the ALKMaps.Layer.HeatMap constructor.

Inherits from

Summary
ALKMaps.Layer.HeatMapA 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.Layer.HeatMapA class for heat map layer.
Functions
setMapRetrieve and set the height and width properties from the map, register the moveend event so that layer will update, and draw the layer.
destroyClean up the layer.
drawGathers the necessary tools and data, and passes it over to the renderer to be visualized.
createIntensityMaskCreates a radial gradient for each point on the layer.
getColorMapCreate the color map using the color gradient.
colorizeIntensityMaskColorizes the intensity mask according to the color gradient.
setPointsSet the points used to draw the heat map.
addPointsAdd points the existing heat map.
clearPointsClear the points being used to render the current heat map.
updateOptionsUpdate the optional settings for drawing the heat map.
setVisibilityHide or show the legend control when the layer visibility is changed.

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.  Canvas is the only supported renderer for this class.  This class will not work in IE8 or lower.

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.Layer.HeatMap

A class for heat map layer.

Parameters

name{String} Used to identify this layer.
options{Object} Optional object whose properties will be set on the instance.

Valid options include

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"]
    ]
});

Functions

setMap

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.

Parameters

map{ALKMaps.Map}

destroy

destroy: function()

Clean up the layer.

draw

draw: function()

Gathers the necessary tools and data, and passes it over to the renderer to be visualized.

createIntensityMask

createIntensityMask: function()

Creates a radial gradient for each point on the layer.

getColorMap

getColorMap: function()

Create the color map using the color gradient.

colorizeIntensityMask

colorizeIntensityMask: function()

Colorizes the intensity mask according to the color gradient.

setPoints

setPoints: function(points)

Set the points used to draw the heat map.

Parameters

points{Array<ALKMaps.LonLat>}

addPoints

addPoints: function(points)

Add points the existing heat map.

Parameters

points{Array<ALKMaps.LonLat>}

clearPoints

clearPoints: function()

Clear the points being used to render the current heat map.

updateOptions

updateOptions: function(params)

Update the optional settings for drawing the heat map.

Parameters

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.

setVisibility

setVisibility: function(visibility)

Hide or show the legend control when the layer visibility is changed.

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.
destroy: function()
Clean up the layer.
draw: function()
Gathers the necessary tools and data, and passes it over to the renderer to be visualized.
createIntensityMask: function()
Creates a radial gradient for each point on the layer.
getColorMap: function()
Create the color map using the color gradient.
colorizeIntensityMask: function()
Colorizes the intensity mask according to the color gradient.
setPoints: function(points)
Set the points used to draw the heat map.
addPoints: function(points)
Add points the existing heat map.
clearPoints: function()
Clear the points being used to render the current heat map.
updateOptions: function(params)
Update the optional settings for drawing the heat map.
setVisibility: function(visibility)
Hide or show the legend control when the layer visibility is changed.
A class for heat map layer.
Instances of ALKMaps.Layer.Vector are used to render vector data from a variety of sources.
Instances of ALKMaps.Map are interactive maps embedded in a web page.
Close