WMSLayer

WMS协议图层

new YS.WMSLayer(options, global)

OGC服务WMS协议图层
Name Type Description
options Object 对象有下面这些属性:
Name Type Default Description
id String optional 唯一标识
name String optional 名称
rectangle Object optional 范围{west, south, east, north}
category String optional 图层分组
url String url,wms服务的根网址,如http://123.57.46.83:8080/geoserver/gisdatamanage/wms
layers String 请求图层Key
tileWidth Number 256 optional 切片宽度
tileHeight Number 256 optional 切片高度
minimumLevel Number optional 最小级数
maximumLevel Number optional 最大级数
transparent Boolean true optional 是否透明
token String optional 天地图服务的应用开发token
isAddTree Boolean optional 是否在图层树上显示
treeIcon String optional 图层树上显示的图标,默认不显示
isQuery Boolean optional 是否支持空间查询
visible Boolean optional 是否可见
global Object 三维球对象(YouScene.earth)
Implements:
Example:
var wmsLayer = youScene.layers.addWMSLayer({
               id: 'wmsLayer',
               url: 'https://mesonet.agron.iastate.edu/cgi-bin/wms/goes/conus_ir.cgi',
               layers: 'goes_conus_ir',
               tileWidth: 256,
               tileHeight: 256,
               minimumLevel: 0,
               maximumLevel: 20,
               name: 'wms_test',
               category: 'WMS测试',
               isAddTree: true
           });
Demo:

Members

readonlylayers : String

获取或设置请求图层Key

readonlytransparent : Boolean

获取或设置切片是否透明

Events

_clickEvent

WMSLayer加载后点击球事件
Name Type Description
promise Promise