参数 ——
version=1.1.1 —— WMS版本号
request=getmap —— 操作动词,可以为GetCapabilities, GetMap和GetFeatureInfo等
layers=topp:states —— 请求地图所包含的图层名,可以为多层
styles=population —— 指定图层绘制的样式名
SRS=EPSG:4326 —— 指定地图的坐标投影系统代码
bbox=-125,24,-67,50 —— 请求地图的范围(The Bounding Box)
width=400 —— 地图的像素宽度
height=200 —— 地图的像素高度,宽度和高度的不同设置可能会引起返回图像的变形
format=image/png —— 返回地图图像的格式,可以为Image/gif, image/jpg, image/svg+xml等等
如果参数设置错误,将返回一个XML文件来描述错误信息。如下所示:
<ServiceExceptionReport version=”1.1.1“>
<ServiceException code=”">
WIDTH and HEIGHT incorrectly specified
</ServiceException>
</ServiceExceptionReport>
GetMap
返回一张图片
Request Parameter Required/Optional Description
REQUEST=GetMap R 请求的操作,此处为GetMap
VERSION=version R WMS版本,使用的参数为1.0.0/1.1.0/1.1.1
LAYERS=layer_list R 图层名称,多个图层使用逗号分开,读取Capabilities 文件里面<Name>的值
SRS=EPSG:id_code R 坐标系
如:SRS=EPSG:2435
BBOX=minx,miny,maxx,maxy R 返回地图范围,单位必须与定义好的坐标系相同
WIDTH=output_width R 返回图像宽度,单位:像素
HEIGHT=output_height R 返回图像高度,单位:像素
STYLES=style_list R 指定图层绘制的样式名
STYLES=&表示读取默认样式
FORMAT=output_format R 输出图片格式
image/jpeg
mage/png
and image/gif
BGCOLOR=color_value O 地图背景色
默认值为0xFFFFFF,白色
TRANSPARENT=TRUE | FALSE O 背景透明度,默认为FALSE
SLD=sld_url O URL of a styled layer descriptor file. See the WMS specification documentation for details.
EXCEPTIONS=exception_format O The format in which exceptions are reported. The default is application/vnd.ogc.se_xml. Other valid formats are application/vnd.ogc.inimage and application/vnd.ogc.se_blank.
REASPECT=TRUE | FALSE
(Vendor Specific) O Used if clients want to reaspect the BBOX. The default is based on the selection made in the WMS Connector Administrator. Reaspect is valid only with Image Services. It is not valid with ArcIMS ArcMap Image Services and is always TRUE.
SERVICENAME=service_name
(vendor specific) O 服务名称
Example 1:最少参数,访问默认WMS服务
http://<hostname>/<deploy_name>/com.esri.wms.Esrimap?SERVICE=WMS&VERSION