heatmapStatistics

AMD: require(["esri/smartMapping/statistics/heatmapStatistics"], (heatmapStatistics) => { /* code goes here */ });
ESM: import heatmapStatistics from "@arcgis/core/smartMapping/statistics/heatmapStatistics.js";
Function: esri/smartMapping/statistics/heatmapStatistics
Since: ArcGIS Maps SDK 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 layers with point geometries are supported.

Method Overview

Name Return Type Summary Function

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

heatmapStatistics

Method Details

heatmapStatistics

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

A view 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.

radius Number
optional

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

optional

Allows for cancelable requests. If canceled, the promise will be rejected with an error named AbortError. See also AbortController.

Returns
Type Description
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

Type Definition
HeatmapStatisticsResult

The statistics returned from the heatmapStatistics() function.

Properties

The maximum kernel density value of all pixels in the view.

The minimum kernel density value of all pixels in the view.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close