PROBLEM
The $map profile variable in the Arcade new expression window is missing, as shown in the image below.
The expected variable is as follows:
Attempts to create an expression for pop-ups through manual input using the $map variable fail and return the Test execution error:
Error: Compilation error - Line : x, y: Identifier not recognized. Verify test data.
The expression is created on a map image layer (map service) instead of a hosted feature layer (feature service). While both map service and feature service are components that make up a web map, a map service focuses on displaying maps as images, while a feature service focuses on serving individual geographic features; points, lines, or polygons with their associated attributes, allowing for more dynamic and interactive experiences, including editing.
Map service is used to create pre-rendered maps, while feature service is for sharing and interacting with individual geographic features. So when creating an ArcGIS Arcade expression, the $map profile is excluded as interaction between different layers in the map, especially the FeatureSet function, is not possible.
Use the expression on a hosted feature layer instead of a map service. For more information regarding feature services, map services and their capabilities, refer to ArcGIS Server: Feature services and ArcGIS Server: Map services.
Article ID: 000036935
Get help from ArcGIS experts
Download the Esri Support App