require(["esri/smartMapping/statistics/heatmapStatistics"], (heatmapStatistics) => { /* code goes here */ });
import heatmapStatistics from "@arcgis/core/smartMapping/statistics/heatmapStatistics.js";
esri/smartMapping/statistics/heatmapStatistics
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 |
---|---|---|---|
Promise<HeatmapStatisticsResult> | Returns an object containing various statistics describing the intensity values for a heatmap visualization of a given point Layer. | heatmapStatistics |
Method Details
-
heatmapStatistics
heatmapStatistics(params){Promise<HeatmapStatisticsResult>}
-
Returns an object containing various statistics describing the intensity values for a heatmap visualization of a given point Layer.
ParametersSpecificationparams ObjectSee the table below for details of each parameter.
Specificationlayer FeatureLayer|CSVLayer|GeoJSONLayer|WFSLayer|OGCFeatureLayer|StreamLayer|OrientedImageryLayer|KnowledgeGraphSublayer|SubtypeGroupLayer|SubtypeSublayerThe 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 StringoptionalThe name of the numeric field for which the statistics will be generated.
radius NumberoptionalThe area of influence for each point as a radius in points from the point.
signal AbortSignaloptionalAllows for cancelable requests. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.ReturnsType Description Promise<HeatmapStatisticsResult> Returns a promise that resolves to HeatmapStatisticsResult. ExampleheatmapStatistics({ layer: featureLayer, view: mapView }).then(function(stats){ // `stats` contains statistics used to construct a heatmap renderer });
Type Definitions
-
The statistics returned from the heatmapStatistics() function.