Constructor
new WMSLayer(viewer, opt)
Example
let wmsLayer = new WMSLayer(viewer,{
url : 'http://localhost:8080/geoserver/wms',
layers : 'xian:satellite16',
parameters: {
service : 'WMS',
format: 'image/png',
transparent: true,
},
minimumLevel: 1,
maximumLevel: 19,
view: {
x: 118.73263653438936,
y: 31.971959788539053,
z: 6643.463555185671,
heading: 341.6647257262609,
pitch: -36.54290725763041,
roll: 359.9323408763138,
},
});
wmsLayer.load();
Parameters:
| Name |
Type |
Description |
viewer |
Cesium.Viewer
|
地图viewer对象 |
opt |
Object
|
基础配置
Properties
| Name |
Type |
Attributes |
Default |
Description |
url |
String
|
|
|
模型服务地址 |
layers |
String
|
|
|
wms服务中图层名称 |
parameters |
Object
|
|
|
地图获取功能GetMap所需要的参数 |
enablePickFeatures |
Boolean
|
<optional>
|
true
|
是否可通过鼠标拾取元素 |
crs |
String
|
<optional>
|
|
CRS定义,WMS版本 >= 1.3.0 |
srs |
String
|
<optional>
|
|
SRS定义,WMS版本为1.1.0 或 1.1.1 |
minimumLevel |
Number
|
|
|
地图服务最小层级 |
maximumLevel |
Number
|
|
|
地图服务最大层级 |
tileWidth |
Number
|
<optional>
|
256
|
服务切片宽度 |
tileHeight |
Number
|
<optional>
|
256
|
服务切片高度 |
|