geosolution/math~WaterReflectionModel()

地理解决方案数学模型-水面倒影模型,因为当前S3MLayer图层支持水下裁剪,因此效果是最好的。

Summary

Methods:
addMathCell

添加水面倒影要素

removeAll

清空水面倒影model中的水面倒影要素

removeMathCellById

根据id从水面倒影模型中移除水面倒影要素

updateDrawDataTask

更新绘制数据,发生删除、修改、或添加操作时调用该方法后才会发生绘制数据更改
注:每次全量刷新

Constructor

new WaterReflectionModel()

水面倒影模型构造函数,当前仅支持添加同一个面上的1个或多个cell,否则会出现异常。

Parameters:
Name Type Description
options.waterHeight Number

水面高度,默认为0,地图单位,如果是4326坐标系,可以通过地图对象上的getDegreePerMeter方法,进行地图单位和米的转换。

options.reflectivity Number

反射率,默认为0.5

options.color module:style~Color

颜色,默认为'hmap.style.Color(0,115,250)'

options.flowDirection Array

水流方向,三维向量类型,仅考虑xy方向,默认为纬度正方向

options.flowSpeed Number

水流速度,默认为1

options.flowScale Number

波浪大小,默认为1

Example
let ReflectionModel=new hmap.geosolution.math.WaterReflectionModel({
    reflectivity:0.3,
    color:new Color(0,0,180)
});

Methods

addMathCell(waterReflection)

添加水面倒影要素

Parameters:
Name Type Description
waterReflection module:geosolution/cell~WaterReflection

反射要素

Example
reflectionModel.addMathCell(reflection);

removeAll()

清空水面倒影model中的水面倒影要素

Example
reflectionModel.removeAll()

removeMathCellById(id)

根据id从水面倒影模型中移除水面倒影要素

Parameters:
Name Type Description
id String

水面倒影要素id

Example
reflectionModel.removeMathCellById(idStr);

updateDrawDataTask()

更新绘制数据,发生删除、修改、或添加操作时调用该方法后才会发生绘制数据更改
注:每次全量刷新