Select to view content in your preferred language

Change ArcGIS online map layer reference from Rest URL to ArcGIS online equivalent layer

2303
5
11-15-2019 11:34 AM
by Anonymous User
Not applicable

I have map layers that point to a rest URL that I'd like to change to the ArcGIS online equivalent layer.

Is this possible without deleting the layer and starting a new one using the ArcGIS online layer equivalent? 

Asked another way...

I created some layers that point to a Rest URL maintained by another organization with popups that use a significant amount of Arcade programming inside them.  The rest URL is changing soon but the equivalent layers are now uploaded to ArcGIS online which then point to a rest URL. 

These layers are managed outside my organization and ideally would stay that way.  The problem is that when the owner of the data needs to change the rest URL my map layers that point to them break.  By pointing to the ArcGIS online equivalent they can update the Rest URL of the ArcGIS online equivalent layer without affecting user maps that utilize them.

0 Kudos
5 Replies
ChelseaRozek
MVP Regular Contributor

Hi Ryan,

     I would give ArcGIS Online Assistant a try. Login with your AGO account, then navigate to your layer. Under the I Want To... button, there's an option for View an Item's JSON. I see a line in there called "sourceUrl" in my feature layer item that points to the item's source service on our unfederated Server. I imagine you could switch that out for the new URL. Editing items' JSON in AGO Assistant is "at your own risk" so be careful. If the service is secured, you will need to update the credentials in the item's settings.

    I use AGO Assistant all the time to "Update the URLs of Services in a Web Map". Super convenient because it won't affect your symbology/popups/etc. It has helped me update http to https in webmaps and redirect layers to new sources pretty quickly.

by Anonymous User
Not applicable

Thanks for sharing that info Chelsea.  I looked into the assistant but in my scenario I'm not sure if it's the solution I'm hoping for because I'm trying to get away from pointing to the Rest URL's with the idea that they will continue to change.  Theoretically, If I'm loading the ArcGIS online equivalent layers I won't need to take any action when the Rest URL's change because the provider will just re-point the ArcGIS online layer to the new URL and I should be good to go.  This workflow is what was recommended to me by the data provider.  

That being said, when I look at the URL's in Assistant for the layers that I've now added from ArcGIS online, the Rest URL's are showing, not the ArcGIS online layer URL's.  This is a little confusing so I'm not even sure what's going to happen when the Rest URL's change for the online equivalent layers.

Until I see this work out I'm still backing up my popup programming into word documents.  I'm a little unsettled by the behavior of the webmaps and webapps in that when the URL's change for layers that are added by Rest URL, the layers just disappear from the maps.  I don't even know if they are deleted, they are just gone.  In my experience, layers disappearing during temporary server disruptions do come back.  I just can't afford to spend the hours I put into them again if they were to be lost.  This is all of little murky for me.

0 Kudos
ChelseaRozek
MVP Regular Contributor

   Ah, it sounds like your data provider would be using ArcGIS Online Assistant then to change the REST URL the AGO layer item points to. 

   I guess I'm confused then when you talk about your layers. Are you making a layer item of their layer item? I would think that would work then if they redirect where their layer item points to. Your layer item should be pointed to their layer item's URL which is something like https://utility.arcgis.com/usrsvcs/servers/ITEMNUMBER/rest/services/SERVICENAME/MapServer.

   I've seen that as well. If ArcGIS Online can't load a layer, it will disappear from the map. If you save the map before the layer reappears/is fixed, it will be removed from the map. Copying the popups config elsewhere is something I also do just in case.

by Anonymous User
Not applicable

Ah, it sounds like your data provider would be using ArcGIS Online Assistant then to change the REST URL the AGO layer item points to.

 

Yes, I believe so.  The provider referred me to Assistant to re-point my layers to the new server but that that might not be the ideal solution because I'll need to continually update over time as changes occur so recommended that I add the layers through AGO instead.  This would also give the provider the freedom to make changes without being concerned about "breaking" user maps. 

I'm connecting to data from 11 GIS's so I'm hoping to reduce maintenance and down time of the layers by adding the layers from AGO rather than the Rest URL's.  It might be that the savings I'm hoping to make are dependent on the providers updating their layers in AGO this way rather than publishing a new layer with the new Rest URL to AGO and deleting the old.

I guess I'm confused then when you talk about your layers. Are you making a layer item of their layer item? I would think that would work then if they redirect where their layer item points to. Your layer item should be pointed to their layer item's URL which is something like https://utility.arcgis.com/usrsvcs/servers/ITEMNUMBER/rest/services/SERVICENAME/MapServer.

I'm adding layers to the webmap by clicking Add Data-Search for Layers, selecting AGO as the source, then navigating to the layers and hitting the plus button to add to the map. 

   I've seen that as well. If ArcGIS Online can't load a layer, it will disappear from the map. If you save the map before the layer reappears/is fixed, it will be removed from the map. Copying the popups config elsewhere is something I also do just in case.

Yes, I believe that is correct although I haven't accidentally saved when a layer was missing.  I've got about 40 layers from a number of GIS's, so this could happen accidentally very easily.  I feel like this is something that would be helpful for ESRI to address in the future.

0 Kudos
JoeKelley1
New Contributor

Hi Chelsea, I have been using AGO Assistant to "Update the URLs of Services in a Web Map". My workflow is custom symbology in arcmap -> AGO hosted feature service->create web map->data source change to REST service(using AGO Assistant). I haven't had an issue with the custom symbology being overwritten by the default REST service layer symbology until today. I have 1 REST service layer that will not cooperate, Different Layers within both the Hosted service & the REST service work fine. Have you run into this issue? 

0 Kudos