Skip to main content

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”: r

{

“color”: “#0000FE”,

“label”: “Cuerpos de Agua”

}

]

}


When rendering the legend it seems to be a problem:


https://creodias.sentinel-hub.com/ogc/wms/MY 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
image


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


Is this a bug?


Thanks

Hey,


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.


Cheers


Thanks!

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.

Best,
 


Reply