GetMap Requests

Feedback


Request parameters

The request parameters for the GetMap operation are shown in the following table:

Table 1 GetMap Operation Request Parameters

Request parameters Whether it is required Description
VERSION=version

Yes

Request version number.

REQUEST=GetMap

Yes

Request name.

Request for GetMap operation. The request name needs to be set to "GetMap".

LAYERS=layer_list

Yes

List of map layers.

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

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

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

STYLES=style_list

Yes

Request a list of styles for layers, separated by commas.

The STYLES value corresponds one-to-one with the LAYERS parameter value. The layer name is the value of the <Style><Name> element defined in the service metadata.

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

SuperMap iServer is not currently implemented. This value should be set to null.

CRS=namespace:identifier

Yes

Coordinate reference system.

The parameter value should be the 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").

The support for spatial reference systems can be found in the coordinate reference system supported by iServer OGC service.

BBOX=minx,miny,maxx,maxy

Yes

Bounding box.

Represents map bounds. The value of this parameter is a string of real numbers separated by half-width English commas, such as "minx, miny, maxx, maxy", which represent the specified CRS respectively area coordinates under Min X, Min Y, Max X, Max Y.

The server will throw a service exception if the request contains an illegal BBOX, such as if min X is greater than or equal to max X, or if min Y is greater than or equal to max Y, etc.

If the range represented by the requested BBOX matches the BoundingBox in the service metadata, if there is no overlap, the server will return an empty content (an empty map, or a graphic element file with no child elements).

WIDTH=output_width

Yes

The pixel width of the map image.

HEIGHT=output_height

Yes

The pixel height of the map image.

FORMAT=output_format

Yes

The output format of the map.

One of the Formats in GetMap declared in the capabilities document of the WMS server.

TRANSPARENT=TRUE|FALSE

No

The background of the map is transparent (false by default).

BGCOLOR=color_value

No

The hexadecimal red-green-blue color value of the background color (default is 0xFFFFFF).

EXCEPTIONS=exception_format

No

Exception reporting format

for WMS (default is XML).

The parameter value must be one of the Exceptions in the service metadata.

TIME=time

No

You want to get the time value of the layer.

SuperMap iServer does not currently implement this feature.

ELEVATION=elevation

No

The elevation of the layer you want to get.

SuperMap iServer does not currently implement this feature.

Other sample dimension(s)

No

Other suitable dimension values.

SuperMap iServer does not currently implement this feature.

layerDefs

No

Attribute filtering with the syntax {<layer1>:<layerDefs1>,<layer2>:<layerDefs2>}, the filter conditions of different layers are represented by ',' separated. Supported comparison operations include =、<>、>、> =、<、<= , the supported string matching operations are BETWEEN AND, IN, like. The logical relationship judgment supported includes AND, OR, NOT. Examples are as follows:

layerDefs={"0.11":"Shape_Area <500 and OBJECTID>100","0.12": "STATE_NAME LIKE ‘N%'"}   

Note that when Layers contains the layer set in layerDefs, the corresponding layer filter effect in layerDefs can be displayed.

Request example

The GetMap operation is requested 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 URI root directory of the service. Please refer to URI Settings .

For example, after the native SuperMap iServer WMS 1.3.0 service starts successfully, access GetMap The URI of the action is: http://localhost:8090/iserver/services/map-world/wms130/WorldMap_Day?VERSION=1.3.0&REQUEST=GetMap&LAYERS=0.8&STYLES=&CRS=CRS:84&BBOX=-180,-90,180,90&WIDTH=800&HEIGHT=400&FORMAT=image/png.

The response result of this request example is shown in the Response example .