Select to view content in your preferred language

Allow to set default style in new map viewer

1953
13
05-11-2022 11:34 PM
Labels (2)
RistoÜlem
New Contributor III

In Map Viewer classic there is an option to set default style for layers. For example if I overwrite the service with new styles I can set default style in Map Viewer Classic. Can't see this option in new map viewer.

13 Replies
YogeshHogale
New Contributor

1. Open in Map Viewer

2. Select any Location style. For.eg. Your layer default style is Location (Unique Symbol), then make it as Location (Single Symbol). Save it.

3. Again Select set drawing style and the option for Set Default style will be visible. Click it and save.

0 Kudos
avalls-nexusgeografics
New Contributor

Good morning, found this post and I would like to add some more detail.

Let me add that using the default styles from the layer it's not only a fact of  usability in configuration.
It also has a performance downgrade: When the styles are setup at web map level, then the applications has to send the styles (json) on every query it's done to the servers. Those styles have to be parsed, etc... On the other hand when using the default styles from the layer, this is not necessary.

On mapserver the performance also means that starts making 2 queryies (POST to /export) instead of a direct GET query.

0 Kudos
ZackRobison
New Contributor II

I'd like this functionality ported as well.  It's not something that I should need to do often, @RussRoberts, but it does come up.  The workarounds for not being able to simply remove configured drawing info from a layer are not good.

  1. Create Web Styles, which makes sense for symbols that would be re-used but is a lot of superfluous work and data for one-off symbologies AND a waste of compute in order to apply the published symbology to a layer.
  2. Re-add and re-configure layers, duplicating work.
  3. Use some admin tools or scripting to update the item's json directly... ew.

As the 3.x JS API disappears into the past and Map Viewer Classic goes with it, it will become a substantially greater annoyance to deal with this issue.  Please consider exposing the ability to remove web map layer renderer configurations in the new Map Viewer.

0 Kudos
RussRoberts
Esri Notable Contributor

No immediate plans to add this to styling panel yet but we do have a reset to source control on the layer that will reset the layer back to its original state. This would in the case for a layer added by URL set the layer back to the source URL props while if it was from an item the layer would reset to the item configuration. 

RussRoberts_0-1685969981515.png