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. |
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. |
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. |
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. |
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, Axios Engineering @version $Id: GetLegendGraphicRequest.java 14060 2010-02-26 23:25:37Z groldan $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|