Data Lens Developer's Guide

HeatmapLayer

Class Summary

Extends: H.datalens.RasterLayer

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

[ For full details, see the Constructor 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(
  queryTileProvider,
  {
    rowToTilePoint: function(row) {
      return {
         x: row.tx,
         y: row.ty,
         count: row.count,
         value: row.value
      };
    }
  }
);

Constructor Details

H.datalens.HeatmapLayer (provider, options)

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

Property Details

optionsPerZoom_[undefined]

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

Default value for dataToRows callback option. It represents each row as an object where property names correspond to data column names.
var layer = new H.datalens.HeatmapLayer(
   provider,
   {
     dataToRows: function(data) {
       return H.datalens.HeatmapLayer.defaultDataToRows(
         data
       ).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 }

Parameters:
 
zoom :
{ number }
zoom level
Returns:
 
:
{ 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.
map.removeLayer(layer);
layer.dispose();

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.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.