Select to view content in your preferred language

Changing map layer grouping, widgets sources break (after building Experience)

1366
5
Jump to solution
10-28-2022 11:41 AM
Curt_H
by
Regular Contributor

I had built an Experience app which was working fine. I moved some of the existing layers being used in one of the maps, by creating new groups and moving layers into those groups. Apparently EB doesn't handle that very well? Charts broke, Lists broke etc. if they were referencing moved layers.

Anyone else 'experience' this? Is this a bug?

Thanks

0 Kudos
1 Solution

Accepted Solutions
Grant-S-Carroll
Esri Contributor

HI @Curt_H it looks like it does. If you use something like ArcGIS Assistant   to view the webmap JSON you should see that the Group Layer is assigned an id and well as all the sub layers.

GrantSCarroll_1-1668237994415.png

 

That Id is then used within Experience Builder along with the id of the layer.

GrantSCarroll_0-1668237761605.png

So when you move your layer out of one group and into another, you are effectively giving it a new id.  

View solution in original post

5 Replies
Grant-S-Carroll
Esri Contributor

Experience Builder is data source driven, and when you add a layer to a widget as data source, the layerId of the layer in the webmap JSON is used as the reference, not the URL. As a result, if you remove a layer that is being referenced, then add it back in again, it will get a new layerId within the map. As a result the data source breaks.

If you need to update a data source, the best way to do it is to use something like ArcGIS Assistant to update just the URL of the service, and maintain the layerId.

GrantSCarroll_0-1666985242812.png

This doesn't fix your issue, but at least hopefully lets you know how things are operating on the back so you can mitigate the issue.

 

Curt_H
by
Regular Contributor

@Grant-S-Carroll  I have experienced the issue again. Making modifications to grouping layers breaks the connection to filter widget and lists. Again, layers are not removed and re added just modifications to grouping. Or maybe I'm not clear: Does the layerId of the layer in the webmap JSON change, if a layer is moved in or out, or to a different group layer? That would more definitively answer my question. 

Thanks again and looking forward to more info

0 Kudos
Grant-S-Carroll
Esri Contributor

HI @Curt_H it looks like it does. If you use something like ArcGIS Assistant   to view the webmap JSON you should see that the Group Layer is assigned an id and well as all the sub layers.

GrantSCarroll_1-1668237994415.png

 

That Id is then used within Experience Builder along with the id of the layer.

GrantSCarroll_0-1668237761605.png

So when you move your layer out of one group and into another, you are effectively giving it a new id.  

Curt_H
by
Regular Contributor

Thanks @Grant-S-Carroll Appreciate the follow up - so the layer ID changes in the web if you decide to create a group layer and move an existing map layer to within that group layer? All I did was create several group layers to better organize what was in the map. No layers in the map broke requiring re-establishing connection or source.  Again to be clear, no layers were removed and re-added.

As far as AGO Assistant I know I can change data sources for maps but no mods to anything  built within EB right? so still a little perplexed. But thanks again for reply. Could browser cache possibly be a culprit?

0 Kudos
Curt_H
by
Regular Contributor

 

re-posted as reply above

 

0 Kudos