heatmapStatistics
require(["esri/renderers/smartMapping/statistics/heatmapStatistics"], function(heatmapStatistics) { /* code goes here */ });
esri/renderers/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 FeatureLayer, GeoJSONLayer, and CSVLayer layer types with point geometries are currently 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. more details | more details | heatmapStatistics |
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 ObjectSee the table below for details of each parameter.
Specification:layer FeatureLayer|CSVLayer|GeoJSONLayerThe layer from which to generate statistics for the pixel intensity values and a given
field
if provided.view MapViewA MapView 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.
blurRadius NumberoptionalThe area of influence for each point as a radius in pixels from the point.
optional A subset of features for which to calculate the statistics.
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
The intensity value statistics returned from the heatmapStatistics() function.
- Properties:
- avg Number
The average of all pixel intensity values for the given view.
optionalcount NumberThe number of features evaluated in the view.
max NumberThe maximum pixel intensity value of all pixels in the given view.
min NumberThe minimum pixel intensity value of all pixels in the given view.
stddev NumberThe standard deviation of the pixel intensity values of all pixels in the given view.
optionalsummaryStatistics SummaryStatisticsResultThe summary statistics for all values returned from the field, if provided.