Getmap Request |
The main request parameters of the GetMap operation are shown in the following table:
Table 1 Main Parameters of GetMap Operation Request
Request parameters | Whether it is required | Description |
VERSION=version |
Yes |
Request version number. |
REQUEST=GetMap |
Yes |
Request name. Request GetMap operation, request name needs to be set to " GetMap " or "Map" (map is version 1.0.0 and is deprecated. This value is supported for backward compatibility). |
LAYERS=layer_list |
No (When there are no LAYERS/STYLES parameters in the request, SLD or SLD_BODY parameters must be included) |
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 tileset name must be the value of the Name element declared in the document returned by the Get Capabilities operation. (You cannot request a Layer that has only a Title and no Name attribute.). If the client requests a layer that does not have a Name attribute or does not exist, the server returns a Code is the exception information of LayerNotDefined. |
STYLES=style_list |
No (Must be included when there is no LAYERS/STYLES parameter in the request SLD or SLD_BODY parameter) |
List of styles for the requested layer, separated by commas. STYLES Values and LAYERS parameter values must be one-to-one. If you request a Style that does not exist , the server will return a Code for StyleNotDefined anomaly. Users can use Style Name Requests pre-defined layer styles from the server, as well as custom layer styles through the SLD parameter. Regarding the priority and matching relationship between the LAYERS/STYLES parameters in the request parameters and SLD (SLD_BODY), see Using SLD. |
SLD=sld_xml_uri |
No (When there are no LAYERS/STYLES parameters in the request, SLD or SLD_BODY parameters must be included) |
URI of the SLD document. See Using SLD for instructions. SLD is a user-defined layer style sheet that the URI must be accessible to the WMS service. |
SLD_BODY=sld_xml_body |
No (When there are no LAYERS/STYLES parameters in the request, SLD or SLD_BODY parameters must be included) |
The specific content of the SLD document. See Using SLD for instructions. |
SRS=namespace:identifier |
Yes |
Spatial coordinate reference system. The parameter value should be GetCapabilities SRS declared by the server in the operation. 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 (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 area coordinates under SRS Min X, Min Y, Max X, Max Y. |
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 (default false). |
BGCOLOR=color_value |
No |
The hexadecimal red-green-blue color value of the background color (default 0xFFFFFF). |
EXCEPTIONS=exception_format |
No |
Exception reporting format for WMS (default SE_XML. The parameter value must be of the WMS server One of the Exception Formats declared in the capabilities document. |
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 |
Additional sample dimension values. SuperMap iServer does not currently implement this feature. |
Vendor-specific parameters |
No |
Optional tentative parameters. 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. |
Note: The case of the parameters is not required, and the order of the request parameters can also be arranged in any order.
GetMap The operation is requested as follows:
<ServiceRoot>?VERSION=version&REQUEST=GetMap&LAYERS=&STYLES=&SRS=&BBOX=&WIDTH=&HEIGHT=&FORMAT=
ServiceRoot is the URI root directory of the service. See Service URI settings.
For example, a native SuperMap After the iServer WMS 1.1.1 service is started successfully, the URI for accessing the GetMap operation is:
Http://localhost:8090/iserver/services/map-World/wms111/ World Map_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 "STYLES = World" means using The predefined style named World in the WMS service renders the layer. The STYLES parameter is null or STYLES = Default Style, indicating a request The default style for the WMS layer. SuperMap iServer lists the default style for the layer in the Capabilities document as Default Style, see GetCapabilities Response Example.