The GetLegendGraphic request works well. I display the legend at a fixed position in my viewer using OpenLayers. But I would like to know if there is any way to add some custom text to the legend.

The legend that geoserver produces is like this: http://docs.geoserver.org/latest/en/user/_images/samplelegend.png

But I need to produce a legend with a title: http://minus.com/m4AP102Jj

Does anyone know if the GetLegendGraphic request in GeoServer, or the SLD style have a way to add this?

UPDATE (23/08/12)

For now I´ll use a litle trick to add a title by adding in my SLD another custom rule above all others that not match any other rules:


        <sld:CssParameter name="fill">[MATCH_BACKGROUND_COLOR]</sld:CssParameter>

1 Answer 1




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.