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
|
- 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