Geovisualization Developer's Guide

H.datalens. HeatmapLayer

Class Summary

Extends: H.datalens.RasterLayer

Provides functionality of value-based heat map with density alpha mask.

[ For full details, see the Class Details ]

Class Description

Layer support different types of blending, including weighted average. Also it allows to apply alpha mask calculated by density. In most cases, the layer consumes data grouped by 1x1 pixels buckets. For proper averaging it requires aggregated value and count (number of rows in bucket) for each bucket. Blending of buckets is implemented via kernel density estimation (KDE) with a Gaussian kernel.
var layer = new H.datalens.HeatmapLayer(
    rowToTilePoint: function(row) {
      return {
         x: row.tx,
         y: row.ty,
         count: row.count,
         value: row.value

Constructor Details

H.datalens.HeatmapLayer (provider, options)

provider : { H.datalens.QueryTileProvider }
Source of tiled data
options : { H.datalens.HeatmapLayer.Options }
Configuration for data processing and rendering

Property Details

static defaultDataToRows : { function( H.datalens.Service.Data , H.datalens.QueryTileProvider.X , H.datalens.QueryTileProvider.Y , H.datalens.QueryTileProvider.Zoom ) : Array.< H.datalens.HeatmapLayer.Row > }

The default value for the dataToRows callback option. It represents each row as an object where property names correspond to data column names.
var layer = new H.datalens.HeatmapLayer(
     dataToRows: function(data) {
       return H.datalens.HeatmapLayer.defaultDataToRows(
       ).filter(function() {

static InputScale : { H.datalens.HeatmapLayer.InputScale }

Set of possible values for the inputScale option.

static Aggregation : { H.datalens.HeatmapLayer.Aggregation }

Set of possible values for the aggregation option.

Method Details

getOptionsPerZoom (zoom) : { module:heatmap~Options }

zoom : { number }
zoom level
: { module:heatmap~Options }

dispose ()

Removes listeners, and references to memory consuming objects, from this layer. Call this method when you no longer need the layer.

redraw ()

Force re-rendering of the layer. In the case where the callbacks passed to the layer options are not pure functions, you can call this method to force re-rendering.