Builds a GetMapRequest object given by a set of CGI parameters supplied in the constructor.
Mandatory parameters:
- LAYERS layer names, as exposed by the capabilities document, to compose a map with, in the order they may appear, being the first layer the one at the bottom of the layer stack and the last one the one at the top.
- STYLES list of named styles known by this server and applicable to the requested layers. It can be empty or contain exactly as many style names as layers was requested, in which case empty strings could be used to denote that the default layer style should be used. (exaple:
LAYERS=buildings,roads,railroads&STYLES=,centerline,
. This example says create a map with roads layer using its default style, roads with "centerline" style, and railroads with its default style. - BBOX Area of interest for which to contruct the map image, in the Coordinate Reference System given by the SRS parameter.
- FORMAT MIME type of the resulting map, must be one of the advertised in the capabilities document.
- WIDTH desired map witdth in output units (pixels). UNITS support should be added to the spec, and UNITS and DPI parameters added.
- HEIGHT desired map height in output units (pixels). UNITS support should be added to the spec, and UNITS and DPI parameters added.
Optional parameters:
- SRS
- TRANSPARENT boolean indicatin wether to create a map with transparent background or not (if transparency is supported by the requested output format).
- EXCEPTIONS MIME type of the exception report.
- BGCOLOR map background color, in
0xRRGGBB
format. - SLD client supplies a URL for a remote SLD document through this parameter. This parameter takes precedence over STYLES. If present, replaces the LAYERS and STYLES parameters, since they're defined in the remote document itself. The document send by this way will be used in "literal" or "library" mode, see explanation bellow.
- SLD_BODY client spplies the SLD document itself through this parameter, properly encoded for an HTTP query string. This parameter takes precendence over STYLES and SLD. If present, replaces the LAYERS and STYLES parameters, since they're defined in the inline document itself. The document send by this way will be used in "literal" or "library" mode, see explanation bellow.
As defined by the Styled Layer Descriptor specification, version 1.0.0, the SLD document supplied by the SLD or SLD_BODY parameter can be used in "literal" or "library" mode, depending on whether the LAYERS= parameter is present.
Here is the explanation from the spec, section 6.4, page 10: "the SLD can also be used in one of two different modes depending on whether the LAYERS parameter is present in the request. If it is not present, then all layers identified in the SLD document are rendered with all defined styles, which is equivalent to the XML-POST method of usage. If the LAYERS parameter is present, then only the layers identified by that parameter are rendered and the SLD is used as a style library . "
@author Gabriel Roldan, Axios Engineering
@version $Id: GetMapKvpReader.java,v 1.12 2004/09/16 22:20:54 cholmesny Exp $
@task TODO: parse and respect SRS parameter (needs reprojection support)