Popup
Since version: 1.1
In the popup profile, map authors can write expressions that return values (i.e. attributes) for display in the view's popup. Expressions can be referenced in the popup content's text template, field tables, and media charts. When the popup displays, the script will execute using the feature's attributes as variables in the expression. The script should return either text or a number and place it in the table cell or text comprising the popup's content. Values returned for charts will be used as the basis for the data-driven chart.
Context
This profile was created for use in the following contexts:
- ArcGIS Maps SDK for JavaScript
- ArcGIS Pro
- ArcGIS Enterprise
- ArcGIS Online
- ArcGIS Maps SDKs for Native Apps
Profile variables
Variable Name | Type | Description |
---|---|---|
$feature | Feature | Provides access to the attributes and geometry of the feature whose popup is to be displayed in the view. |
$layer | FeatureSet | A collection of features in the same layer as the $feature whose popup is displayed in the view. In ArcGIS Online and ArcGIS Enterprise portal, this only applies to feature service layers. |
$map | FeatureSetCollection | A collection of layers in the same map as the $feature whose popup is displayed in the view. In ArcGIS Online and ArcGIS Enterprise portal, this only applies to feature service layers. |
$datastore | FeatureSetCollection | A collection of layers in the same feature service or database as the $feature whose popup is displayed in the view. In ArcGIS Online and ArcGIS Enterprise portal, this only applies to feature service layers. |
Function bundles
Core | Geometry | Data Access | Portal Access
Return types
Example
Calculates the percentage of the population that participates in the labor force.