Sentinel Hub WMS Legends (in Leaflet)

I’d like to find out more about adding legends to WMS maps from Sentinel Hub (and rendering these using Leaflet).

  1. Is there a default for legends? I am unable to find these, using the GetLegendGraphic request ( https://services.sentinel-hub.com/ogc/wms/{instanceId}?service=WMS&request=GetLegendGraphic&layer={layer} )

  2. If there is no default, is there some way to retrieve the colours generated by the HighlightCompressVisualizer and their corresponding values, such that this can be used to create a custom legend in the Advanced Layer Editor?

  3. If the colours can not be automatically retrieved, is there a more complete set of processing scripts and legends such as this for NDVI (for layers such as moisture index and false-colour).

Finally, once I have the legend, how can I render this using Leaflet? I found the option to generate an instance ID, open in EO browser and generate code using the wrench, but this does not include a legend.

To create your own legend, check this:
https://www.sentinel-hub.com/faq/how-define-custom-legend

All products from EO Browser should be available here:

Hopefully this helps?

Hi, your suggestion is what I had found, and what I referred to under point 2 of my original post (“create a custom legend in the Advanced Layer Editor”).

My question is: HOW do I get colour and numerical values that match those being rendered on the map?

This depends on the layer by layer basis so it is not possible to answer in a generic manner.
In most cases it is linear interpolation between two colors. But rather than bothering with this we suggest you configure new layers in line with your requirements, similarly as you see it for NDVI.