The GET parameters of the GetLegendGraphic operation are defined as follows (from SLD 1.0 spec, ch.12):
Parameter | Required | Description |
VERSION | Required | Version as required by OGC interfaces. |
REQUEST | Required | Value must be GetLegendRequest . |
LAYER | Required | Layer for which to produce legend graphic. A layergroup can be specified, too. In this case, STYLE and RULE parameters can have multiple values (separated by commas), one for each of the group layers. |
STYLE | Optional | Style of layer for which to produce legend graphic. If not present, the default style is selected. The style may be any valid style available for a layer, including non-SLD internally-defined styles. A list of styles separated by commas can be used to specify styles for single layers of a layergroup. To override default style only for some layers leave empty the not overridden ones in the list (ex. style1,,style3,style4 to use default style for layer 2). |
FEATURETYPE | Optional | Feature type for which to produce the legend graphic. This is not needed if the layer has only a single feature type. |
RULE | Optional | Rule of style to produce legend graphic for, if applicable. In the case that a style has multiple rules but no specific rule is selected, then the map server is obligated to produce a graphic that is representative of all of the rules of the style. A list of rules separated by commas can be used to specify rules for single layers of a layergroup. To specify rule only for some layers leave empty the not overridden ones in the list (ex. rule1,,rule3,rule4 to not specify rule for layer 2). |
SCALE | Optional | In the case that a RULE is not specified for a style, this parameter may assist the server in selecting a more appropriate representative graphic by eliminating internal rules that are outof- scope. This value is a standardized scale denominator, defined in Section 10.2 |
SLD | Optional | This parameter specifies a reference to an external SLD document. It works in the same way as the SLD= parameter of the WMS GetMap operation. |
SLD_BODY | Optional | This parameter allows an SLD document to be included directly in an HTTP-GET request. It works in the same way as the SLD_BODY= parameter of the WMS GetMap operation. |
FORMAT | Required | This gives the MIME type of the file format in which to return the legend graphic. Allowed values are the same as for the FORMAT= parameter of the WMS GetMap request. |
WIDTH | Optional | This gives a hint for the width of the returned graphic in pixels. Vector-graphics can use this value as a hint for the level of detail to include. |
HEIGHT | Optional | This gives a hint for the height of the returned graphic in pixels. |
LANGUAGE | Optional | Permits to have internationalized text in legend output. |
EXCEPTIONS | Optional | This gives the MIME type of the format in which to return exceptions. Allowed values are the same as for the EXCEPTIONS= parameter of the WMS GetMap request. |
TRANSPARENT | Optional | true if the legend image background should be transparent. Defaults to false . |
There's also a custom {@code STRICT} parameter that defaults to {@code true} and controls whetherthe mandatory parameters are to be checked. This is useful mainly to be able of requesting a legend graphic for no layer in particular, so the LAYER parameter can be omitted.
The GetLegendGraphic operation itself is optional for an SLD-enabled WMS. It provides a general mechanism for acquiring legend symbols, beyond the LegendURL reference of WMS Capabilities. Servers supporting the GetLegendGraphic call might code LegendURL references as GetLegendGraphic for interface consistency. Vendorspecific parameters may be added to GetLegendGraphic requests and all of the usual OGC-interface options and rules apply. No XML-POST method for GetLegendGraphic is presently defined.
@author Gabriel Roldan @version $Id$
|
|
|
|
|
|
|
|
|
|
|
|