Getmap Request

Feedback


Request parameters

The main request parameters of GetMap are as following:

Table 1 The Parameters of a GetMap Request

Request Parameters O/M Description
VERSION=version

Mandatory

Request version numbers.

REQUEST=GetMap

Mandatory

Request names.

For GetMap, the value GetMap shall be used. (In WMS version 1.0.0, the value of this parameter was "map". That value is now deprecated, but for backwards compatibility a post-1.0.0 server should accept either form without issuing a Service Exception).

LAYERS=layer_list

Optional

(The SLD or SLD_BODY must be included if there is not LAYERS/STYLES in the request.)

Comma-separated list of one or more map layers. Optional if SLD parameter is present. A WMS shall render the requested layers by drawing the leftmost in the list bottommost, the next one over that, and so on.

Layer names must be values of Name elements declared in documents returned by the GetCapabilities operation.

(It is not allowed to request Layer with only Title attribute but without Name attribute). If the client requests layers without Name attribute or layers that do not exist, the server will return an exception information whose Code is LayerNotDefined.

STYLES=style_list

Optional

(The SLD or SLD_BODY must be included if there is not LAYERS/STYLES in the request.)

Comma-separated list of one rendering style per requested layer.

There is a one-to-one correspondence between the values in the  LAYERS   parameter and the values in the STYLES   parameter. A server shall throw an exception (code=StyleNotDefined) if an unadvertised Style is requested.

Users can request the layer style predefined by server through Style Name parameter, and also can request the customized layer style through SLD parameter.

The priority and match relationship between the LAYERS/STYLES parameter pair and SLD(SLD_BODY), please see Using SLD

SLD=sld_xml_uri  

Optional

(The LAYERS/STYLES must be included if there is neither SLD nor SLD_BODY in the request.)

The URI of the SLD document. For details, see Using SLD

SLD is a user-defined layer style sheet. This URI has to be accessible to WMS service.

SLD_BODY=sld_xml_body

Optional

(The LAYERS/STYLES must be included if there is neither SLD nor SLD_BODY in the request.)

The specific content of SLD document. For details, see Using SLD

SRS=namespace:identifier

Mandatory

Spatial Reference System.

This parameter value should be SRS declared by the server in the GetCapabilities operation.

Support for spatial reference systems, see The coordinate reference sytem for publishing supported by iServer OGC services.

BBOX=minx,miny,maxx,maxy

Mandatory

Bounding box corners (lower left, upper right) in SRS units. Bounding box, the value of the BBOX parameter in a GetMap request is a list of comma-separated numbers of the form "minx,miny,maxx,maxy". They represent minimum X, minimum Y, maximum X, maximum Y of area coordinates in the specified SRS respectively.

WIDTH=output_width

Mandatory

Width in pixels of map picture.

HEIGHT=output_height

Mandatory

Pixel heights of map pictures.

FORMAT=output_format

Mandatory

Output formats of maps.

One of Format in GetMap declared in capabilities documents of the WMS server.

TRANSPARENT=TRUE|FALSE

Optional

Whether the map background is transparent (the default is FALSE).

BGCOLOR=color_value

Optional

Hexadecimal red-green-blue color values of background colors (the default is 0xFFFFFF).

EXCEPTIONS=exception_format

Optional

The format in which exceptions are to be reported by the WMS (default=SE_XML).

This parameter value must be one of Exception Format declared in capabilities documents of the WMS server.

TIME=time

Optional

Time value of layer desired.

SuperMap iServer has not realized this functionality at present.

ELEVATION=elevation

Optional

Elevations of layers that are expected to get.

SuperMap iServer has not realized this functionality at present.

Other sample dimension(s)

Optional

Value of other dimensions as appropriate.

SuperMap iServer has not realized this functionality at present.

Vendor-specific parameters

Optional

Optional experimental parameters.

SuperMap iServer has not realized this functionality at present.

Note:The case of parameters is not mandatory, and request parameters can be arranged in an arbitrary order.

Request example

Request methods of the GetMap operation are as follows:

<ServiceRoot>?VERSION=version&REQUEST=GetMap&LAYERS=&STYLES=&SRS=&BBOX=&WIDTH=&HEIGHT=&FORMAT=

ServiceRoot is the service URI root directory. Please se Setting the Service URI.

For example, when the local SuperMap iServer WMS 1.1.1 service has been successfully started, the URI to access the GetMap operation is URI: http://localhost:8090/iserver/services/maps/wms111/WorldMap_Day?VERSION=1.1.1&REQUEST=GetMap&layers=0.10&STYLES=World&SRS=EPSG:4326&BBOX=-180.0,-90.0,180.0,90.0&WIDTH=800&HEIGHT=400&FORMAT=image/png

Where "STYLE=WORLD" means rendering the layer by using the pre-defined sytle named World in the WMS service. If the STYLE is empty or STYLE=Default Style, it means requesting the default style of WMS layer. The default layer style is also listed in Capabilities document, named Default Style, please see GetCapabilities Response example