Re-sourcing WebMap layer from one Hosted feature Layer to Another

927
4
Jump to solution
04-09-2021 11:08 AM
Labels (2)
MichaelMacRae
New Contributor II

Hello. I have a webmap that I designed a few months ago and I have used a hosted feature layer (geodatabase) from My Content as one of the layers I use the map. I have applied a number of properties to that layer. I have created a new hosted feature layer that contains the same table as my original hosted feature layer and I want to source the layer in my webmap to the new hosted feature layer so I do not have to reconfigure all the properties I had set on the layer. I have tried to use the AGOL Assistant to replace the layer, but it seems like it can only update service layer URL's in my webmap. Is there any ways I can re-source the layer in the map to the new hosted feature layer?

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Updating the service layer URL is "re-sourcing" the layer, if I'm understanding your post correctly. If you look at the Web Map's JSON definition, you'll see that the URL is part of each layer's definition.

{
    "operationalLayers": [
        {
            "id": "Sales_Hosted_2910",
            "layerType": "ArcGISFeatureLayer",
            "url": "https://services6.arcgis.com/U1zX3Wx8hhY7Gb30/arcgis/rest/services/Sales_Hosted/FeatureServer/0",
...

 

Swapping URLs for your layers using the AGO Assistant retains all the other properties and accomplishes what you seem to be looking for. Just go to the item page of the new feature layer, find the service URL in the bottom-right. There's the URL you need to paste in.

jcarlson_0-1618021067322.png

 

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Esteemed Contributor

Updating the service layer URL is "re-sourcing" the layer, if I'm understanding your post correctly. If you look at the Web Map's JSON definition, you'll see that the URL is part of each layer's definition.

{
    "operationalLayers": [
        {
            "id": "Sales_Hosted_2910",
            "layerType": "ArcGISFeatureLayer",
            "url": "https://services6.arcgis.com/U1zX3Wx8hhY7Gb30/arcgis/rest/services/Sales_Hosted/FeatureServer/0",
...

 

Swapping URLs for your layers using the AGO Assistant retains all the other properties and accomplishes what you seem to be looking for. Just go to the item page of the new feature layer, find the service URL in the bottom-right. There's the URL you need to paste in.

jcarlson_0-1618021067322.png

 

- Josh Carlson
Kendall County GIS
maryandrews
New Contributor III

I can't get AGO Assistant to work.  I used it two years ago and it was great.  Anyone used it lately? 

 

0 Kudos
MichaelMacRae
New Contributor II

I've been using it most weeks without any issue...

MichaelMacRae
New Contributor II

Thanks Josh. this works.

0 Kudos