Feature reduction popup

Since version: 1.15

In the feature reduction popup profile, map authors can write expressions that return values (i.e. attributes) for display in the popup of a clustering or binning visualization. Expressions can be referenced in the popup content's text template, field tables, and media charts. The expression executes when the popup displays. The script should return either text or a number and be referenced in the table cell or text comprising the popup's content.

Context

The following products implement this profile:

Spatial reference

The spatial reference of the map in which the expression executes determines the execution context's spatial reference.

Time zone

The time zone of the map in which the expression executes determines the execution context's default time zone.

Profile variables

Variable NameTypeDescription
$featureFeatureProvides access to the aggregate fields defined in either clustering or binning popups, such as $feature.cluster_count and any other fields summarized from the points represented by the aggregate (e.g. $feature.cluster_avg_population).
$aggregatedFeaturesFeatureSetA FeatureSet containing all the features represented by the cluster or bin.

Function bundles

Core | Geometry | Data Access | Portal Access

Return types

Text | Number

Example

Calculates the number of crashes that had at least one fatality within a cluster of vehicle accidents.

Use dark colors for code blocksCopy
1
2
3
4
// returns the total number of car crashes
// that resulted in at least one fatality in a
// cluster representing motor vehicle accidents
Count(Filter($aggregatedFeatures, "FATALITIES > 0"))

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