Error rendering legend for a layer using WMS GetLegendGraphic

Hi team,

I’m having the following problem rendering a legend using WMS service.

I created a layer that shows water bodies.
I added the legend definition to the advanced section of the Layer configuration
“legend”: {
“type”: “discrete”,
“items”: [
“color”: “#0000FE”,
“label”: “Cuerpos de Agua”

When rendering the legend it seems to be a problem: INSTANCE ID?service=WMS&request=GetLegendGraphic&format=image%2Fpng&layer=CUERPOS-DE-AGUA&version=1.3.0&SLD_VERSION=1.1.0

With height=50,width=200, it seems ok

With height=200,width=200, it seems out of scale and the text is upside down

Is this a bug?



this seems to indeed be a bug that happens when the label doesn’t have enough space.

To avoid it for now, make sure that the width is large enough, so that both the color and the label have enough space. You can also set only width or only height in the request - but in this case the other dimension is automatically set to the optimal value, so it might not be usable if you need to have both of the dimensions strictly set.

Thanks for reporting this. I will let you know when it gets fixed.


Thanks Ziga!

Please let me know when this is fixed

Please take in account that I’m using creodias WMS service, and not the standard sentinel hub WMS (see URL), in case this needs an extra deployment step.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.