[Geoserver-users] getLegendGraphic with SLD

Hi list,

I'm not sure this if a bug nor not, hence my asking.

If you perform a getLegendGraphic request using an SLD to define the
style, i.e:
http://myserver/geoserver/wms/GetLegendGraphic?VERSION=1.0.0&FORMAT=imag
e/png&WIDTH=150&HEIGHT=150&LAYER=shapefile:continent&SLD=http://myserver
/temp/symbology/SLD/tmp_03305695_1.sld

You have to specify a layer name in the request
("&Layer=shapefile:continent").

Really, the layer you are getting the LegendGraphic for doesn't really
matter, because the it would look the same no matter what. The only
exception would be if you tried to request a LegendGraphic for line data
using a SLD that defines a style for a Point, for example (note also:
currently, the LegendGraphic for a Point would still be rendered, even
if a Line Feature is specified in "Layers=").

I'm using getLegendGraphic in my symbol catalogue to show how a symbol
would look, and the SLD is automatically generated. These symbols aren't
necessarily linked to features. They're essentially just styles on their
own.

So all I do is put "&Layer=shapefile:continent" in every request and
although it is completely irrelevant, it works. It will not work without
it.

I may just be in a bit of a pedantic mood!

Miles Jordan
Applications Developer
The Australian Antarctic Data Centre

[p] +61 3 6232 3486
[f] +61 3 6232 3359
[e] miles.jordan@anonymised.com
[w] http://www.aad.gov.au/
___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
        Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________