Select to view content in your preferred language

Updating webmap layers saved as items

191
0
06-11-2024 10:44 AM
Labels (2)
ZorbaConlen1
Occasional Contributor III

Hi. We tend to build web mapping apps in dev or test and then migrate to production. One part of that migration is updating the layers in the webmap so that they are using the proper map/feature service according to the environment. Assuming the layers are referenced via the service url, this task is fairly easy. Our dev, test and prod services follow the same pattern, so I can use ArcGIS Online to do a search and replace, something like below:

This is especially useful for webmaps that have a lot of layers or complicated configurations of labels, popups, arcade expressions, etc.

Now, the problem. I'm creating a new webmap in dev but saving each feature layer as an item. Doing this mainly because we can store credentials for secured services with the item, thus eliminating the need for staff to sign in to the secured service (also, it seems Esri is recommending this pattern, as a better approach to creatign webmaps - I saw this I think in a blog post, but not finding it now). So far, so good, but when it comes to updating the test webmap, the AGOL Assistant 'Update URLs of a Webmap...' tool can't be used because the webmap now references a bunch of items, each with it's own random alpha-numeric item id. Since there is not pattern to these IDs, there is no easy way to automate updates\migrations between environments (no search and replace capability).

ZorbaConlen1_1-1718127725858.png

 

Looking for recommendations. We do subscribe to Geo Jobe Admin tools, which has a bunch of tools for managing portals, but not really finding a good work flow with that option. Perhaps there are options with arcgis api for python?

Thanks

 

 

 

 

So, let's say I have my dev webmap, referencing a dev map service and I'm ready to create the test version,

0 Kudos
0 Replies