GetMap Requests

Feedback


Request parameters

Request parameters of the GetMap operation are shown in the following table:

Table 1 Request parameters of the GetMap operation

Request Parameters O/M /Optional Description
VERSION=version

Mandatory

Request version numbers.

REQUEST=GetMap

Mandatory

Request names.

Requests the GetMap operation, and the request name needs to be set as "GetMap".

LAYERS=layer_list

Mandatory

Lists of map layers.

Map layers are separated by half-angle English commas. The leftmost layer is at the bottom, and the next layer is placed above the previous one, and so on.

The layer name is the character data content of the <Layer><Name> element in service metadata.

The optional <LayerLimit> element in service metadata specifies maximum layer number that can be requested.

STYLES=style_list

Mandatory

Style lists of request layers, and layer styles are separated by English commas.

Each STYLES value is associated with one LAYERS parameter value. The layer name is the <Style><Name> element value defined in service metadata.

If requests a Style that does not exist, the server will return a service exception (code=StyleNotDefined).

SuperMap iServer has not realized at present. This value should be set as empty.

CRS=namespace:identifier

Mandatory

Coordinate reference system.

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

If the request contains a CRS that the server does not support, the server will throw a service exception (code = "InvalidCRS").

Please refer to Coordinate reference system supported by iServer OGC services.

BBOX=minx,miny,maxx,maxy

Mandatory

BoundingBox.

Represents map extents. This parameter value is a string of real numbers separated by half-angle English commas, in the form of "minx, miny, maxx, maxy", representing minimum X, minimum Y, maximum X and maximum Y of area coordinates in the specified CRS respectively.

If the request contains an invalid BBOX, such as situations in which minimum X is larger than or equal to maximum X, or minimum Y is larger than or equal to maximum Y, the server will throw a service exception.

If the extent represented by the requested BBOX does not overlap the BoundingBox in service metadata, the server will return an empty content (an empty map, or a graphic element file without subelements).

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

Exception error report formats of WMS (the default is XML).

This parameter value must be one of Exception in service metadata.

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

Other proper dimension values.

SuperMap iServer has not realized this functionality at present.

Request example

Request methods of the GetMap operation are as follows:

<ServiceRoot>?VERSION=version&REQUEST=GetMap&LAYERS=layer_list&STYLES=style_list &CRS=namespace:identifier&BBOX=minx,miny,maxx,maxy&WIDTH=output_width &HEIGHT=output_height&FORMAT=output_format  

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

For example, when the local SuperMap iServer WMS 1.3.0 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.11&STYLES=&SRS=EPSG:4326&BBOX=-180.0,-90.0,180.0,90.0&WIDTH=800&HEIGHT=400&FORMAT=image/png.

Please refer to Response example to see the result.