Class: HeatMapTile

HeatMapTile(data, options)

Tile for the HeatMap layer visualising data on a canvas using shades of gray scale.

Constructor

new HeatMapTile(data, options)

Constructs a HeatMapTile. Returns one tile for the HeatMap information. It is basically an interface specifying the public methods properties and default configuration. The logic itself is handled in the subclasses.
Parameters:
Name Type Description
data Array.<Object> Array of information constituting points in the map.
options Object
Properties
Name Type Description
sector Sector Sector representing the geographical area for this tile. It is used to correctly interpret the location of the MeasuredLocation on the resulting canvas.
width Number Width of the Canvas to be created in pixels.
height Number Height of the Canvas to be created in pixels.
radius Number Radius of the data point in pixels. The radius represents the blur applied to the drawn shape
incrementPerIntensity Number The ratio representing the 1 / measure for the maximum measure.
intensityGradient Object Keys represent the opacity between 0 and 1 and the values represent color strings.
Source:

Methods

canvas() → {HTMLCanvasElement}

Returns the whole Canvas. It is then possible to use further. This one is actually used in the HeatMapLayer mechanism so if you want to provide some custom implementation of Canvas creation in your tile, change this method.
Source:
Returns:
Canvas Element representing the drawn tile.
Type
HTMLCanvasElement

(protected) createCanvas(width, height) → {HTMLCanvasElement}

Creates canvas element of given size.
Parameters:
Name Type Description
width Number Width of the canvas in pixels
height Number Height of the canvas in pixels
Source:
Returns:
Created the canvas
Type
HTMLCanvasElement

(protected) draw() → {HTMLCanvasElement}

Draws the shapes on the canvas. Create shapes based on the gradient. Each of the gradient colors has associated shape, which defines how strong will be the center point.
Source:
Returns:
Type
HTMLCanvasElement

(protected) shape() → {HTMLCanvasElement}

Creates a canvas containing the circle of the right size. THe default shape is circle, but subclasses can change this behavior.
Source:
Returns:
Canvas representing the circle.
Type
HTMLCanvasElement

url() → {String}

Returns the drawn HeatMapTile in the form of URL.
Source:
Returns:
Data URL of the tile.
Type
String