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
|
Extends
Members
_layer
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
layer |
Cesium.ImageryLayer | 图层 |
_provider
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
provider |
Cesium.ImageryProvider | 图层 |
id
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
id |
String | Number | 图层id |
imageryLayerAttr
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
imageryLayerAttr |
Object | imageryLayer相关配置 |
providerAttr
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
providerAttr |
Object | provider相关配置 |
type
Properties:
Name | Type | Description |
---|---|---|
type |
String | 类型 |
Methods
hide()
- Description:
- 隐藏
- Overrides:
load()
- Description:
- 加载
- Overrides:
remove()
- Description:
- 移除
- Overrides:
setAlpha(alpha)
- Description:
- 设置透明度
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
alpha |
Number | 透明度(0~1) |
setVisible(visible)
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
visible |
Boolean | 是否显示 |
show()
- Description:
- 展示
- Overrides:
zoomTo()
- Description:
- 缩放至图层
- Overrides: