geosolution/math~TracePointModel(options)

地理解决方案数学模型-点轨迹模型

Summary

Methods:
addMathCell

添加一个点轨迹要素

pause

动画暂停

removeAll

清空点轨迹模型中的点轨迹要素

removeMathCellById

根据id从点轨迹模型中移除点轨迹要素

start

动画开启

Constructor

new TracePointModel(options)

点轨迹模型

Parameters:
Name Type Description
options object
Name Type Description
loop Boolean

点轨迹动画是否循环播放,默认为true,注意如果未设置循环播放,播放结束后点轨迹对象虽然不再显示,但是并没有被删除,需要手动去移除和删除。

blendMode Boolean

混合模式,当前有两种设置模式,“additive”和“normal”。“additive”为颜色叠加,红、绿、蓝三种颜色的线相交部分为白色;“normal”为透明度混合,物体表现为前后遮挡,默认为“additive”。

depthTest Boolean

是否开启深度测试,默认为false

Example
let flowModel=new hmap.geosolution.math.TracePointModel({
    needLoop:true,
    colorAddition:false
});

Methods

addMathCell(tracePoint)

添加一个点轨迹要素

Parameters:
Name Type Description
tracePoint module:geosolution/cell~TracePoint

点轨迹要素

Throws:
TypeError -

参数类型出错,抛出异常。

Example
let coordSeq = new hmap.basetype.CoordSeq[coord1,coord2];
let trace = new hmap.geosolution.cell.tracePoint({
     coordSeq:coordSeq
});
tracePointModel.addMathCell(trace);

pause()

动画暂停

removeAll()

清空点轨迹模型中的点轨迹要素

Example
tracePointModel.removeAll()

removeMathCellById(id)

根据id从点轨迹模型中移除点轨迹要素

Parameters:
Name Type Description
id String

点轨迹要素id

start()

动画开启