Skip To ContentArcGIS for DevelopersSign In Dashboard

heatmapStatistics

require(["esri/renderers/smartMapping/statistics/heatmapStatistics"], function(heatmapStatistics) { /* code goes here */ });
Function: esri/renderers/smartMapping/statistics/heatmapStatistics
Since: ArcGIS API for JavaScript 4.8

Function for generating statistics from a Layer for a HeatmapRenderer visualization.

It is important to note that the input layer must have features available in the input view for the heatmapStatistics() method to generate pixel intensity statistics.

Known Limitations

Only FeatureLayer, GeoJSONLayer, and CSVLayer layer types with point geometries are currently supported.

Method Overview

NameReturn TypeSummaryFunction
Promise<HeatmapStatisticsResult>

Returns an object containing various statistics describing the intensity values for a heatmap visualization of a given point Layer.

more details
more detailsheatmapStatistics

Method Details

heatmapStatistics(params){Promise<HeatmapStatisticsResult>}

Returns an object containing various statistics describing the intensity values for a heatmap visualization of a given point Layer.

Parameters:
Specification:
params Object

See the table below for details of each parameter.

Specification:

The layer from which to generate statistics for the pixel intensity values and a given field if provided.

view MapView

A MapView instance used to calculate pixel intensity values based on the features in the current view.

field String
optional

The name of the numeric field for which the statistics will be generated.

blurRadius Number
optional

The area of influence for each point as a radius in pixels from the point.

features Graphic[]
optional

A subset of features for which to calculate the statistics.

Returns:
TypeDescription
Promise<HeatmapStatisticsResult>Returns a promise that resolves to HeatmapStatisticsResult.
Example:
heatmapStatistics({
  layer: featureLayer,
  view: mapView
}).then(function(stats){
  // `stats` contains statistics used to construct a heatmap renderer
});

Type Definitions

HeatmapStatisticsResult

The intensity value statistics returned from the heatmapStatistics() function.

Properties:
avg Number

The average of all pixel intensity values for the given view.

count Number
optional

The number of features evaluated in the view.

max Number

The maximum pixel intensity value of all pixels in the given view.

min Number

The minimum pixel intensity value of all pixels in the given view.

stddev Number

The standard deviation of the pixel intensity values of all pixels in the given view.

summaryStatistics SummaryStatisticsResult
optional

The summary statistics for all values returned from the field, if provided.

API Reference search results

NameTypeModule
Loading...