Popup Element
Since version: 1.16
The popup element profile allows map authors to write expressions that return a dictionary representing either a rich text, fields table, or media (i.e. a chart or an image) popup element. The returned dictionary must follow the Web Map Specification for a popupElement. When the popup opens, the expression will execute using the feature's attributes as variables. The app executing the expression will render the popup element as defined by the expression.
Unlike the Popup profile, this profile allows popup authors to return multiple values within a single element.
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
See the Web Map Specification for popupElement for a list of properties required for constructing a valid popup element dictionary.
Example
Returns a HTML list that describes the number of power plants used to generate power for each fuel type in the cluster.