HOW TO
In ArcGIS Online and Portal for ArcGIS Map Viewer, pop-ups display attribute information of feature layers available in a web map. Displaying attributes of intersecting features from different layers in a pop-up ensures the clarity of the information portrayed on the map. This article provides the workflow to display the attributes of the intersecting features in a pop-up via ArcGIS Arcade in ArcGIS Online and Portal for ArcGIS Map Viewer.
The images below show the attributes of the feature from Layer1 and the attributes of an intersecting feature from Layer2 on the map. The workflow provided uses an Arcade expression to display the AREA_NAME field of the feature from Layer2 in the pop-up of the feature from Layer1.
var <VariableName1> = FeatureSetByName($map, "<LayerName>", ["<FieldName>"])
var <VariableName2> = Intersects(<VariableName1>, Buffer($feature, <BufferSize>))
var <VariableName3> = ''
for (var <VariableName4> in <VariableName2>){
var <VariableName5> = DomainName(<VariableName4>, '<FieldName>')
<VariableName3> += `${<VariableName5>}, `}
return Left(<VariableName3>, Count(<VariableName3>) - 2)
var feat = FeatureSetByName($map, "Layer1", ["AREA_NAME"]) var intersectFeat = Intersects(feat, Buffer($feature, 1)) var out_str = '' for (var x in intersectFeat){ var feat_name = DomainName(x, 'AREA_NAME') out_str += `${feat_name}, `} return Left(out_str, Count(out_str) - 2)
The pop-up of the feature from Layer1 below shows the Area Name field of the intersecting feature from Layer2 after applying the Arcade expression in Map Viewer.
Article ID: 000028227
Get help from ArcGIS experts
Download the Esri Support App