Select to view content in your preferred language

Update Symbology for a Feature Layer in a Webmap on Portal

4923
2
Jump to solution
03-11-2021 11:20 AM
AndrewBowne
Frequent Contributor

Is there a relatively easy way to update symbology for a feature layer in a webmap?  In ArcGIS Pro have been modifying symbology for a few datasets and when I Publish/overwrite the feature service the symbology for those feature layers is not applied.  They only way I can figure out how to apply it is to remove and re-add the feature layer.  This is a real pain as these layers have scale dependencies and custom popups.  So, every time I remove/add I have to reconfigure.

I have seen an article that suggests using the Python API to achieve this but that seems like a whole lot of work for something that is seemingly simple to do.  Any suggestions?

1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi Andrew,

Unfortunately that is the expected behavior of services and web maps. When a service is added to a new web map, it essentially becomes static. Any changes made to the layer outside of the web map do not directly impact the layer in the web map. This goes for new features, edited records, changes to symbology, etc. 

While the Refresh Interval can pull in new and edited records, the same cannot be said for symbology, pop-up configuration, and labelling. This is described in the following defect (applies for both ArcGIS Online and Portal for ArcGIS): https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA5Mzg4MA==

The only workaround is to remove and add the layer back to the web map, which as you found, resets a lot of visualization customization. Since all of this information is stored in the web map JSON, adding the new layer to the web map refreshes this information. To quickly import the previous symbology back into the web map, you could try using the ArcGIS API for Python, as you have mentioned, or ArcGIS Online Assistant to copy the JSON of the specific layer and paste it back after adding the new layer.

Here are some potentially useful resources:

https://community.esri.com/t5/arcgis-api-for-pythn-blog/methods-for-updating-layer-symbology-with-th...

https://ago-assistant.esri.com/ (I want to -> View an Item's JSON)

In short, it will require some effort to update the symbology of an existing web map while also keeping other visualizations. This is the expected functionality of the software at this time.

Best,

Calvin  

View solution in original post

2 Replies
by Anonymous User
Not applicable

Hi Andrew,

Unfortunately that is the expected behavior of services and web maps. When a service is added to a new web map, it essentially becomes static. Any changes made to the layer outside of the web map do not directly impact the layer in the web map. This goes for new features, edited records, changes to symbology, etc. 

While the Refresh Interval can pull in new and edited records, the same cannot be said for symbology, pop-up configuration, and labelling. This is described in the following defect (applies for both ArcGIS Online and Portal for ArcGIS): https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA5Mzg4MA==

The only workaround is to remove and add the layer back to the web map, which as you found, resets a lot of visualization customization. Since all of this information is stored in the web map JSON, adding the new layer to the web map refreshes this information. To quickly import the previous symbology back into the web map, you could try using the ArcGIS API for Python, as you have mentioned, or ArcGIS Online Assistant to copy the JSON of the specific layer and paste it back after adding the new layer.

Here are some potentially useful resources:

https://community.esri.com/t5/arcgis-api-for-pythn-blog/methods-for-updating-layer-symbology-with-th...

https://ago-assistant.esri.com/ (I want to -> View an Item's JSON)

In short, it will require some effort to update the symbology of an existing web map while also keeping other visualizations. This is the expected functionality of the software at this time.

Best,

Calvin  

AndrewBowne
Frequent Contributor

Thanks for the clarification, Calvin.  I ended up going through the AGO Assistant and wiping out any layerDefinition properties for the Feature Layer in the JSON and that seemed to "force" the Webmap to import the most current symbology for that feature layer.  I'm not sure if that's the best workaround but it worked for me.  Tinkering in AGO Assistant is usually a nail-biting experience!

Just a suggestion for a possible enhancement:  Within the webmaps feature layer Change Style dialog, perhaps a way to "Fetch Feature Layer Symbology".  Like, an additional option here:

AndrewBowne_0-1615831688419.png

Thanks, Again

-Andrew