ALKMaps.Control.HeatMapLegend

The HeatMapLegend control displays minimum and maximum counts with image legend.  It utilizes HTML Canvas to draw the legend image.

Inherits from

Summary
ALKMaps.Control.HeatMapLegendThe HeatMapLegend control displays minimum and maximum counts with image legend.
Properties
imageLegendElementFor legend image color gradient
minValueElementFor minimum value
maxValueElementFor maximum value
headerLegend title header
bodyLegend body
layerIdThe layer that this control works with
visibleDetermines this control is allowed to be visible or not.
Functions
drawDraw the control.
drawItemsDraw legend items.
updateMinMaxUpdates minimum and maximum counts.
updateLegendGradientUpdates legend color gradient.
changeVisibilityChanges control’s visibility.

Properties

imageLegendElement

For legend image color gradient

minValueElement

For minimum value

maxValueElement

For maximum value

header

Legend title header

body

Legend body

layerId

The layer that this control works with

visible

Determines this control is allowed to be visible or not.

Functions

draw

draw: function()

Draw the control.

drawItems

drawItems: function()

Draw legend items.

updateMinMax

updateMinMax: function(min,
max)

Updates minimum and maximum counts.

Parameters

min{Number}
max{Number}

updateLegendGradient

updateLegendGradient: function(colorGradient)

Updates legend color gradient.

Parameters

colorGradient{Object} For example: [[0.2, “#0000ff”], [0.5, “#00ffff”], [0.6, “#00ff00”], [0.95, “#ffff00”], [1, “#ff0000”]]

changeVisibility

changeVisibility: function(show)

Changes control’s visibility.  If control’s visible property is set to false, this control will always be hidden.

Parameters

show{Boolean}
draw: function()
Draw the control.
drawItems: function()
Draw legend items.
updateMinMax: function(min,
max)
Updates minimum and maximum counts.
updateLegendGradient: function(colorGradient)
Updates legend color gradient.
changeVisibility: function(show)
Changes control’s visibility.
Controls affect the display or behavior of the map.
Close