Create popup with attributes from multiple layers

182
2
06-18-2021 12:47 PM
Labels (2)
JeffThomasILM
Occasional Contributor II

I'm trying to create a custom pop up that includes attributes from multiple layers. Based on this example, it seems like FeatureSets should be the way to do this. The problem is this requires a geometry evaluation; e.g., return any features from layer B that intersect the feature I selected on layer A. This is overly complex; all I want returned are the features (if any) from layer A or B located exactly where I clicked - plain old  popup behavior. I looked at all the geometry functions available but none of them seem to emulate a simple click. Is there a completely different way to accomplish this? Thanks!

2 Replies
jcarlson
MVP Regular Contributor

The popup itself should display a "X of N" indicator when your clicked location has multiple features.

jcarlson_0-1624046042492.png

The content of a single popup is defined by the layer, not the map. The click finds three features with popups, and thus three popups, then returns them as "stacked".

That said, you can usually get what you want if you're willing to dig into the JS API for it. Short of that, you may be able to make a widget in Experience Builder (or Web App Builder - Developer Edition) that can list multiple popups in a single frame.

- Josh Carlson
Kendall County GIS
KristalWalsh
Occasional Contributor

I'm going to try posting this question here. I have not used Arcade before but obviously I need to learn. I have the exact scenario that @JeffThomasILM described but simply I only want to display in the pop-up an attribute from another feature layer. I tried to follow the example provided in this article, "pump-up-your-pop-ups-with-arcade-and-the-living-atlas" and I think the intersection for spatially related data will work for me, but I'm not having any luck with the two layers I'm working with. They are in a web map and do not have any common attributes but are spatially related. If I could get the expression correct, I can use it to create pop-ups for all the rest of my layers. I appreciate any tips. Thank you. Kristal  

Kristal Walsh
Tags (2)
0 Kudos