Class: HeatMapColoredTile

HeatMapColoredTile()

Tile for the HeatMap layer visualising data on a canvas using colour scale.

Constructor

new HeatMapColoredTile()

Constructs a HeatMapColoredTile. The default implementation using the shades of gray to draw the information produced by the HeatMapTile is a source for coloring. This class colours the provided canvas based on the information contained in the intensityGradient.
Parameters:
Name Type Description
options.intensityGradient Object Keys represent the opacity between 0 and 1 and the values represent color strings.
options.extendedWidth Number Optional. Minimal width that needs to be retrieved for colorization.
options.extendedHeight Number Optional. Minimal height that needs to be retrieved for colorization.
Source:

Extends

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.
Inherited From:
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
Inherited From:
Source:
Returns:
Created the canvas
Type
HTMLCanvasElement

draw()

The coloured version colorizes only the cropped area relevant for the display. The rest is ignored.
Overrides:
Source:

(protected) shape() → {HTMLCanvasElement}

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

url() → {String}

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