Communicating with a WMS service in a Web browser |
|
Release 9.3 |
This topic shows how you can use URL parameters to communicate with a WMS service in a Web browser.
The online resource of each operation supported by a compliant WMS server is an HTTP Uniform Resource Locator (URL), so a WMS service can be considered as a Representational State Transfer (REST) service. Unlike a standard Web Service, a SOAP client is not necessary for consuming a WMS service, and a Web browser is the simplest client. You can get a WMS service's service level metadata, a map image, or attributes values of a feature all by sending a URL request to the server and viewing the corresponding responses in browser either as an XML document or an image.
Here's a sample WMS GetCapabilities request URL:
http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?service=WMS&request=GetCapabilities&version=1.3.0Here's the XML response of the request above:
Here's a sample WMS GetMap request url:
http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?VERSION=1.3.0&REQUEST=GetMap&CRS=CRS:84&BBOX=-178.217598,18.924782,-66.969271,71.406235&WIDTH=765&HEIGHT=360&LAYERS=0,1,2&STYLES=,,Symbolizer&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUEAnd here's the map you see in your browser in response to the request above:
Here's a sample WMS GetFeatureInfo request URL:
http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?REQUEST=GetFeatureInfo&SERVICE=WMS&VERSION=1.1.1&LAYERS=0&STYLES=default&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&SRS=EPSG:4326&BBOX=-125.192865,11.2289864971264,-66.105824,62.5056715028736&WIDTH=1044&HEIGHT=906&QUERY_LAYERS=0&X=103&Y=462Here's the XML response you would see:
In many cases a Web browser may not be a preferred WMS client, but it is always a good tool to track and debug the communication between a WMS server and client.
OGC Web Map Service specifications define a complete list of request parameters which can be used in each WMS operation. See the links below for different versions of the OGC WMS implementation specification:
The tables below list all the request parameters that are applicable to the WMS implementation in ArcGIS Server 9.3, which is only a subset of those defined in the specification.