Hi everyone. I have a layer with about 100 polygons. I needed a way for people to be able to toggle on these polygons individually in an Experience Builder app (similar to the capability of the interactive legend instant app). My first attempt at this was adding the whole layer and then having a series of filters to toggle each polygon. I got feedback that it wasn’t very user-friendly or intuitive.
My next try was to split the layer by attribute so each polygon was in its own layer in Arc Pro. I shared the layers as a web map to AGOL and added it to the web map underpinning the app so they were all in the layers list with their own checkboxes to turn them on/off. This is more what I was after, but now the app is running so slowly, if it even loads at all. Now I’m getting feedback that browser windows are crashing when people try to open it.
I’m wondering a few things:
- did I not share the layers to AGOL properly? Like is there something making them too bulky or something for the map? I know it’s a lot of layers in there but I have seen web maps with tons of layers that ran fine.
- maybe there is another way to accomplish what I’m trying to do with the interactive legend type layer list? One of my colleagues suggested a list widget, which would be great except that the visibility of individual polygons cannot be toggled. I want the toggling because some of the polygons overlap because they are showing different options for one area.
- I am just assuming it is the number of layers causing issues. So is there a way to see what exactly is jamming up the app? Like to be able to pinpoint that it is the number or type of layers versus some other issue with the app structure?
thanks everyone!
Solved! Go to Solution.
I think that List Widget is the way to go. Use a single layer. Connect it to a List Widget. Add a Record Selection Changes Action to filter either the Map or the Framework. Clicking an item in the List should filter stuff on the Map. The List also has built in search and filter functions.
Hi @KaraG how many layers are within your web map once you split the initial polygon layer up? To me, a polygon layer of 100 polygons doesn't sound like too much, so it is strange that you are seeing performance issues with it.
Is the web map public? If so, can you provide the URL here so that I can try testing with it?
Unfortunately, it is not public. When I split the layer up, into individual polygons, I end up with about 100 individual layers (most containing a single shape).
I think by any measure, 100 layers is a lot. One layer with a hundred polygons, that's a different story. Is there any way you can set up a filter that targets maybe a subset of them so that some overlapping polygons can be removed, but there aren't too many filters for your users to navigate? I would say that knowing how to filter is a basic concept of using web maps these days, so you might have to tell some people that having 100 toggleable layers just isn't in the cards.
Thanks, it does seem to be heading that way. I just thought having a ton of layers wouldn't be such a slowdown if they each only contained one polygon? But I think I can do as you suggested of having a few filters that each target a subset.
If all of the layers are toggled on, your map will be making a request to the server for each one. I have a map with ~70 layers that my users steadfastly refuse to simplify that makes minimum 300 server requests every time they use it. Not ideal.
I think that List Widget is the way to go. Use a single layer. Connect it to a List Widget. Add a Record Selection Changes Action to filter either the Map or the Framework. Clicking an item in the List should filter stuff on the Map. The List also has built in search and filter functions.
Thanks, I'm going to try this approach again.