Hey,
I removed the instance id from the error text, so it won’t get abused by others. I will write an answer shortly.
The URL looks correct.
There is some mistake in the code for legend or somewhere else in the code for the advanced layer settings, so the legend is not created.
To check if the legend exists, you can check in the getCapabilities
example for legend
item in getCapabilities
:
<LegendURL>
<Format>image/png</Format>
<OnlineResource xlink:type="simple" xlink:href="https://services.sentinel-hub.com/ogc/wms/{instance-id}?request=GetLegendGraphic&service=WMS&layer={layer-id}&style=default"/>
</LegendURL>
You can also paste the code for the legend (or, if you are ok with sharing the evalscript of the layer, for the whole styles
object in the advanced layer settings) here and we can debug it together.
Cheers
I succeded, thanks, I have another question now, are these numbers always the same?
Yes, they are fixed - they should be the same as the values defined in the code for the legend.
Do you have some predefined legend values for different layers, now every legend in my app is the same (I have NDVI, LAI, NBR etc.)?
We don’t have predefined legends gathered in one place yet, but some layers / custom scripts in the Custom scripts repository have legend in their description, like Sentinel-2 L2A NDVI.
You can also see the legends of different layers in EO Browser and create a similar ones.