TileLayer.WMS

概述

显示WMS服务,扩展TileLayer,实现ILayer接口

用法示例

// 在折线等路径上设置一个popup
 var nexrad = FMap.tileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
    layers: 'nexrad-n0r-900913',
    format: 'image/png',
    transparent: true,
    attribution: "Weather data © 2012 IEM Nexrad"
});

创建(Creation)

创建:

创建 描述
FMap.tileLayer.wms( <String> baseUrl, <TileLayer.WMS options> options ) 设置url和option对象实例化一个tileLayer,wms对象

选项(Options)

选项:

选项 类型 默认值 描述
layers String '' (必需)将显示的WMS图层以逗号分隔的列表传入
styles String '' 将WMS styles的列表以逗号分隔
format String 'image/jpeg' WMS图片的格式
transparent Boolean FALSE 如果为true,WMS服务将会返回透明图片
version String '1.1.1' 所用的WMS服务版本
crs CRS null WMS请求的参考坐标系,默认使用地图的坐标系

方法(Methods)

方法:

方法 参数 返回值 描述
setParams() <WMS parameters> params,<Boolean> noRedraw? this 用传入的WMS parameters合成一个新对象,并且在当前屏幕上重新请求瓦片(noRedrawwas为true时无效)

results matching ""

    No results matching ""