Inputs and Behaviors
When invoking GetMap a WMS query can specify:
Input | Required | Description |
---|---|---|
VERSION=version |
Yes | Request version. Spectrum Technology Platform WMS supports both version 1.1.1 and 1.3.0 of the OGC specification. |
SERVICE=WMS |
Yes | Service type. This is always WMS. |
REQUEST=GetMap |
Yes | Request name. For a GetMap request this is always GetMap. |
LAYERS=layer_list |
Yes |
The layer or layers to be included in the map image. Each layer should be separated by a comma. For example:
|
STYLES=style_list |
Yes |
Comma-separated list of one rendering style per requested layer. A style is required for each layer requested. If no style is requested, the attribute must be present but without a value. If requesting multiple layers, the styles listed should be in the same order as the layers. For example:
In the above example the second style (for the second layer requested) is left blank, allowing the default style defined for the layer to be used. |
SRS=namespace:identifier |
Yes for 1.1.1 | The spatial reference system used in the map (numeric representation of the projection of the map, also known as the coordinate reference system). This parameter is only used for 1.1.1 versions of the OGC specification. |
CRS=namespace:identifier |
Yes for 1.3.0 | The coordinate reference system used in the map (numeric representation of the projection of the map, also known as the spatial reference system). This parameter is only used for 1.3.0 versions of the OGC specification. |
BBOX=minx,miny,maxx,maxy |
Yes | The area to be mapped. The bounding box is specified as the four coordinates of the corners of the box that bounds the map area to be included in the image. The BBOX coordinates are always expressed in the units of the SRS or CRS. The axis order (which axis is x and which axis is y) is determined by the authority that owns the coordinate system definition. This is most frequently EPSG, whose definitions are available at www.epsg-registry.org. For the GetMap operation, you need to be aware of the axis order for each coordinate system when you construct the BBOX. |
WIDTH=output_width |
Yes | Width in pixels of map image. |
HEIGHT=output_height |
Yes | Height in pixels of map image. |
FORMAT=output_format |
Yes | The format in which the map image is to be returned. |
TRANSPARENT=TRUE|FALSE |
No | The transparency and color of the background of the image. If nothing is specified, the value is FALSE. |
BGCOLOR=color_value |
No | Hexadecimal red-green-blue color value for the background color (default=0xFFFFFF). |
RESOLUTION=resolution |
No | The DPI of the map image. If less than 72 dpi, an exception is thrown. |
EXCEPTIONS=exception_format |
No | The format in which exceptions are to be reported by the WMS (default=XML). |
The request parameters are always sent as an HTTP query string. The following are sample GetMap requests:
WMS version 1.1.1:
http://<server>:<port>/rest/Spatial/WMS?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap
&SRS=EPSG:4326&BBOX=-100,0,90,100&WIDTH=400&HEIGHT=300&Layers=World&STYLES=AreaStyle
&FORMAT=image/png
WMS version 1.3:
http://<server>:<port>/rest/Spatial/WMS?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap
&CRS=EPSG:4326&BBOX=-100,0,90,100&WIDTH=400&HEIGHT=300&Layers=World&STYLES=AreaStyle
&FORMAT=image/png