Change feature service source for an existing AGOL web map

1822
5
04-24-2019 05:30 AM
nancyvonmeyer
New Contributor III

I have an AGOL web map that is pointing to a feature service. I want to redirect that same map to a different data source, the new data source has the same structure but I just want to source the data differently - how can I do this? thank you in advance

5 Replies
Egge-Jan_Pollé
MVP Regular Contributor

Hi nancy vonmeyer‌,

  1. Of course you could go to the ArcGIS Online Map Viewer to remove the old feature service and add the new feature service, but in that case you will loose all settings on the old layer and you will have to reset everything on the new one...
  2. Another solution might be to log in to the ArcGIS Online Assistant. This tool allows you to view and edit (!!) an items JSON. So, you could search the definition of your AGOL web map for the URL to the old feature service and replace it with a new URL.

HTH,

Egge-Jan

nancyvonmeyer
New Contributor III

I have to dive into the JSON to update where the map points?  Do you think I manage that intuitively or am I stepping into deep waters here?  obviously building the web map and all the popups and cartography is the time consuming part so I would really prefer to be able to just redirect the map to a new data source.  

0 Kudos
Egge-Jan_Pollé
MVP Regular Contributor

Oh yeah, deep waters. Definitely! The ArcGIS Online Assistant will warn you when you dare to edit an item's JSON:

You are about to directly modify the contents of an item. Do not proceed unless you are absolutely certain of the risks.

See also screen capture below. So, don't try this at home if you don't dare. And - very important - don't blame me if things go wrong... 🙂

But all that said, I do think it is doable... and it will save you the tedious work with all the popups and cartography stuff.

Above you state 

the new data source has the same structure

so let's suppose only the URL and the item id are different (and all the rest is the same).

Steps to take:

  1. Login to ArcGIS Online Assistant and search your web map
  2. Choose I want to view an item's JSON
  3. Just having a look will hurt nobody. As long as you do not edit, nothing can go wrong - see second screen capture below
  4. Go to the Data section of your Web Map and copy the content (to have a backup)
  5. Search and replace the url and the itemId of your layer.

It might work (and save you a lot of work). Please let us know how it worked out.

Cheers,

Egge-Jan

0 Kudos
nancyvonmeyer
New Contributor III

Thank you Egge - I will give it a roll, nothing to lose

ChantellKrider1
New Contributor II

Worked for me. Thank you.

0 Kudos