水面特效图层类
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
参数选项:
|
Example:
var effectLayer = new Cesium.GeoWaterEffectLayer({
url: '/geomap-api/JsCesuimDemo/lib/Cesium/Assets/Textures/grey.png',
waterColor: new Cesium.Color(0.439, 0.564, 0.788, 0),
waveWidth: 6,
flowDirection: 0,
flowSpeed: 0.7,
});
viewer.effectLayers.add(effectLayer);
effectLayer.setData([
{
"type": "Feature",
"properties": {
"name": "Water1"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[108.95784047447702, 34.219977705424250, 422],
[108.95782804955876, 34.219364587415185, 422],
[108.95838631130526, 34.219330390989890, 422],
[108.95839328710329, 34.220033491883065, 422]
]
]
}
}
]);
Demo:
Extends
Methods
检查指定的几何类型是否为图层对象所支持
Name | Type | Description |
---|---|---|
geometryType |
String | Array.<String> | 被检查的几何类型 |
supportGeometryType |
Array.<String> | 支持的几何类型列表,如果为空则为本图层的supportGeometryType属性值 |
绑定到三维地图
Name | Type | Description |
---|---|---|
map |
viewer |
- Inherited From:
销毁图层对象
- Inherited From:
获取图层数据
- Inherited From:
获取数据源
- Inherited From:
隐藏图层
拾取图层中的要素
Name | Type | Description |
---|---|---|
pickedFeatures |
Array | 场景中被拾取的对象集合,需要在图层自己内部判断识别出属于自己的,并挂接上图层的属性信息 |
windowPosition |
Cartesian2 | 画布的二维坐标 |
Returns:
返回固定形态的结构数据
Example:
//返回结构参考样例
{
eventType: ScreenSpaceEventType.LEFT_CLICK,
originalLayer: GeoODFaceEffectLayer
param:{
info: pickedFeature,
pickedInfos: pickedFeatureList
}
}
将图层从视图移除
移除数据源
- Inherited From:
设置图层相关数据
Name | Type | Description |
---|---|---|
features |
Array.<Object> | geojson要素数组,本类只支持Polygon几何对象类型 |
Example:
effectLayer.setData([
{
"type": "Feature",
"properties": {
"name": "Water1"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[108.95784047447702, 34.219977705424250, 422],
[108.95782804955876, 34.219364587415185, 422],
[108.95838631130526, 34.219330390989890, 422],
[108.95839328710329, 34.220033491883065, 422]
]
]
}
}
]);
设置数据源
Name | Type | Description |
---|---|---|
dataSource |
GeoDataSource |
- Inherited From:
显示图层