[Geoserver-devel] [jira] Created: (GEOS-1622) Create a non-blank legend for GetLegendGraphic for SLD with TextSymbolizer only, using SLD font characteristics

Create a non-blank legend for GetLegendGraphic for SLD with TextSymbolizer only, using SLD font characteristics
---------------------------------------------------------------------------------------------------------------

                 Key: GEOS-1622
                 URL: http://jira.codehaus.org/browse/GEOS-1622
             Project: GeoServer
          Issue Type: Improvement
          Components: WMS
    Affects Versions: 1.6.0-RC1
            Reporter: Aleda Freeman
            Assignee: Andrea Aime
            Priority: Minor

It would be nice to be able to grab a legend for a label that looks the same way the label is rendered.

If the SLD for a style contains ONLY a TextSymboloizer, respond to a GetLegendGraphic by creating a legend graphic that contains the word "Label", rendered in the font-family, font-style, and font-size, and font-color of the SLD.

For example, this request

http://giswebservices.massgis.state.ma.us/geoserver/wms/wms?SERVICE=WMS&LAYERS=massgis%3AGISDATA.GEONAMES_PT_PLACES&FORMAT=application/openlayers&TRANSPARENT=FALSE&HEIGHT=477&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=463&BBOX=233119.24454422027,908486.4073673335,236377.68358854766,911843.3737261762&STYLES=GISDATA.GEONAMES_PT_PLACES%3A%3ADefault&SRS=EPSG:26986&VERSION=1.1.1/png

has in it's SLD:

<Font>
  <CssParameter name="font-family">Arial</CssParameter>
  <CssParameter name="font-weight">bold</CssParameter>
  <CssParameter name="font-size">12</CssParameter>
</Font>
<Fill>
   <CssParameter name="fill">#000000</CssParameter>
</Fill>

So I would prefer a graphic with "Label" in Arial, bold, 12 point, black (see attached image label_1.png)

whereas this request:

http://giswebservices.massgis.state.ma.us/geoserver/wms/wms?SERVICE=WMS&LAYERS=massgis%3AGISDATA.GEONAMES_PT_HYDRO&FORMAT=application/openlayers&TRANSPARENT=FALSE&HEIGHT=477&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=463&BBOX=233119.24454422027,908486.4073673335,236377.68358854766,911843.3737261762&STYLES=GISDATA.GEONAMES_PT_HYDRO%3A%3ADefault&SRS=EPSG:26986&VERSION=1.1.1

has in it's SLD:

<Font>
  <CssParameter name="font-family">Arial</CssParameter>
  <CssParameter name="font-style">italic</CssParameter>
  <CssParameter name="font-size">10</CssParameter>
</Font>
<Fill>
  <CssParameter name="fill">#004DA8</CssParameter>
</Fill>

So I would prefer a graphic with "Label" in Arial, italic, 10 point, blue (hex = #004DA8) (see attached image label_2.png)

(Halo would be nice to include, but I use it rarely and sometimes it's white, so I put that as super low priority.)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira