Skip to content

Conversation

meyerlor
Copy link
Contributor

@meyerlor meyerlor commented Sep 30, 2025

I hope to help and fix the missing legends for external WMS services:

#5934

External WMS layers were showing empty legend icons because QGIS Server
returns empty icon fields in JSON GetLegendGraphic responses.

  • Added getLegendGraphicPNG() method to WMS class
  • Modified updateLayerTreeLayersSymbology() to detect external WMS layers
  • External WMS layers now fetch PNG legend and convert to base64
  • Normal layers continue using JSON format (no breaking changes)

I'm not sure if that is enough to get a proper legend from the WMS, i was not able to run proper tests, i just wanted to lay the groundwork to get WMS legends working (i hope it does not interfere with the recent changes which sped up the loading time so much! 😃 )

External WMS layers were showing empty legend icons because QGIS Server
   returns empty icon fields in JSON GetLegendGraphic responses.

   - Added getLegendGraphicPNG() method to WMS class
   - Modified updateLayerTreeLayersSymbology() to detect external WMS layers
   - External WMS layers now fetch PNG legend and convert to base64
   - Normal layers continue using JSON format (no breaking changes)
@github-actions github-actions bot added this to the 3.11.0 milestone Sep 30, 2025
@rldhont
Copy link
Collaborator

rldhont commented Oct 6, 2025

Thanks @meyerlor

Can you provide a printscreen with your fix ? I'm not sure that the GetLegendGraphic will be well displayed as an icon.

@meyerlor
Copy link
Contributor Author

meyerlor commented Oct 8, 2025

I'm away from a computer the next three weeks, will get back at it as soon I'm back!

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.

2 participants