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:
Example:
<sld:Rule>
<sld:Name>[NAME]</sld:Name>
<sld:Title>[TITLE]</sld:Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>[PROPERTY_NAME]</ogc:PropertyName>
<ogc:Literal>[SOME_VALUE_THAT_NOT_MATCH_OTHER_RULES]</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<sld:PolygonSymbolizer>
<sld:Fill>
<sld:CssParameter name="fill">[MATCH_BACKGROUND_COLOR]</sld:CssParameter>
</sld:Fill>
</sld:PolygonSymbolizer>
</sld:Rule>