2

Im am trying to ask GeoServer for a horizontally orientated colorbar legend for my raster layer. I prepared an SLD style for the layer and asked for the legend with the GetLegendGraphic method, including: legend_options=layout:horizontal in the request. The result is indeed a horizontal legend, but with its labels rotated and above the color bar. What I am after is just a horizontal color bar with the labels beneath it. What am I missing?

My server request is: http://localhost:8090/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=50&HEIGHT=30&LAYER=Sacstests:S5P_NRTI_L2__NO2____20190401_latlon_0.500000&legend_options=layout:horizontal

The results (with and without the horizontal option) are included below. As you can see, the whole legend has rotated, including the labels, wereas I would like the labels to stay upright, and be placed below the colorbar.

Horizontal legend version

Vertical legend version

  • 1
    can you add the legend images to your question – Ian Turton Jun 29 at 15:22
  • Sure. I have updated the post. – Jvg Jun 29 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.