Changing layer source in AGOL....

12154
9
Jump to solution
01-26-2016 08:55 AM
AaronManuel
New Contributor III

My question is about changing the data source of layers in ArcGIS Online.

I have a webmap shared with a few test groups in my organization ( I work for local government). It's a basic civic infrastructure type map that I eventually plan to roll out to everyone in our department.

Most of the layers in the map are pointing to a feature service that I have published from arcmap. I had originally planned to just update it once a week by publishing from the map. However, our IT department has been working on getting more of our ArcServer SDE layers put into our REST services directory. This is great since I won't have to update it weekly like I had planned.

But.....I'm trying to figure out how I can switch my current map over to using these services without having to re-create the whole map. I have a bunch of layers in the map with multiple filters, redundant layers used for labelling, etc.

Is there a way to just point the existing web map layer to a new source or am I going to have to add the REST service layers like new?

The main reason I have for wanting to do this besides just the time it would take is I'm trying to preserve the symbology I created in Arcmap. As far as I can tell the only ways to have custom symbology are 1. - publish from Arcmap , 2. - store images in a directory and link to them.

Am I missing something?

Thanks

Tags (2)
1 Solution

Accepted Solutions
9 Replies
RebeccaStrauch__GISP
MVP Emeritus

Take a look at

ArcGIS Online Assistant​​

and https://github.com/Esri/ago-tools

GitHub - Esri/ago-tools: A Python package to assist with administering ArcGIS Online Organizations.

and

https://marketplace.arcgis.com/listing.html?id=c34019b0623041608df4d06970a7a96a

There are tools that let you change datasource and other things.  It may not do what you need completely, but worth check out.

AaronManuel
New Contributor III

Rebecca,

Thanks a lot for the links, this is exactly what I was looking for!

I changed a few of my layers' sources with the AGOL Assistant, and it looks like the symbology, filters, and labels are all preserved.

RebeccaStrauch__GISP
MVP Emeritus

Good to know it worked and kept symbology and all.  I wasn't sure if it would or not.

0 Kudos
MichaelVolz
Esteemed Contributor

Rebecca:

Can you only use a tool such as "Update the URLs of Services in a Web Map" if you are the not the one who published a web map?

I ask because I am an Administrator of AGOL for my organization, but it appears that this tool only selects web maps that I created (published).

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

If you are an administrator (and not just a publisher), I would think you could change the ownership to yourself (if being withint the group is not enough), do the updates, and then transfer ownership back if needed. 

Not something that I have tried, but would expect that would work.

alex_friant
Occasional Contributor II

I don't know if something changed in the interim, but the update service URL option in AGO Assist didn't complete the job. It certainly updated the URL's but the Maps's JSON also has a 'item id' value which that tool doesn't change. The result is that the map ignores the URL change and still pulls in the old reference using the original item id.

The solution is to use the Edit JSON option for the map, and also update the item id value which matches your new map source.

I noticed this because when I clicked on "view item details" for the updated layer, it took me to the old item instead of the new one. I think the layer in the map pulls the data from the service URL, but if you don't change the "item ID" in the JSON, then people could get super confused about why they are getting taken to an differnt or deleted item.

by Anonymous User
Not applicable

After reading your post, I noticed the same thing in my web map's json.  How do you edit the json?  The web map is in my AGOL account and we have to update our data source url's due to moving to a new web server so this is a first for us making these kind of updates.  I want to make sure I get it right this first time. Thanks for any tips or website articles you can point me to! 

0 Kudos
alex_friant
Occasional Contributor II

Here are the steps to do this particular thing:

Example of how to edit item ID for layer in Map using AGO Assistant:

Tags (3)
by Anonymous User
Not applicable

This was just what I needed!  Thank you!

0 Kudos