Skip to content

fix: remove symbology from legend for secure layers - #2329

Open
steff-o wants to merge 1 commit into
origo-map:masterfrom
ornskoldsvikskommun:fix-legendgraphics-for-padlocked-layers
Open

fix: remove symbology from legend for secure layers#2329
steff-o wants to merge 1 commit into
origo-map:masterfrom
ornskoldsvikskommun:fix-legendgraphics-for-padlocked-layers

Conversation

@steff-o

@steff-o steff-o commented May 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #2290

No new configuration.

Symbology in the legend for secure layers is replaced with empty symbol (No legend available) to avoid potential calls to the server which may deny the request. The symbology setting of the layer itself is not affected in order to not mess too much up if someone implements a way to "unsecure" a layer without reloading the map.

A more fine grained approach could have been implemented that only avoid symbols using calls to getLegendGraphics, which is the most common problem with secure layers, but since the layer is not visible anyway there is no reason to display symbology even if client side symbology would be possible to display. This allows for a cleaner less layer dependent implementation.

If a secure layer has StylePicker, the StylePicker is not displayed for same reason as above.

PrintLegend is not affected as it only creates legend for visible layers and secure layers are not visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legend calls GetLegendGraphics for padlocked layers

1 participant