GeoEntityEffectTrackline

尾迹线特效,继承自GeoEntityEffect;注意:此类不支持父类bChangeSizeFlowModel属性。

new Cesium.GeoEntityEffectTrackline()

Name Type Default Description
options.visible Boolean true optional 特效显隐
options.pntOffset PlotPoint3D PlotPoint3D(0, -0.5, 0.5) optional 偏移
options.geoEntity GeoEntity null optional 特效绑定的地理实体对象
options.initialColor Color Color.RED optional 尾迹线色
options.lineWidth Number 1 optional 尾迹线宽
options.streamerWidth Number 1 optional 尾迹飘带宽
options.showPntCount Number 500 optional 尾迹线点个数
options.aryGradientColors Array [Color.RED] optional 渐变色颜色数组(最多支持5个)
options.intervalDistance Number 0 optional 尾迹最小取点间距
options.colorLightScale Number 1 optional 颜色亮度增强倍数

Methods

_addEffectToScene(scene)

添加特效到场景
Name Type Description
scene scene 场景

_removeEffectFromScene(scene)

从场景中移除特效
Name Type Description
scene scene 场景
克隆
Returns:
返回克隆对象

fromJSON(jsonObj)

Json字符串转对象
Name Type Description
jsonObj String Json字符串

getColorLightScale()Number

获取颜色亮度缩放倍数。
Returns:
颜色亮度缩放倍数。

getGradients()Array

获取渐变色数组。
Returns:
返回渐变色颜色数组。

getIntervalDistance()Number

获取取点最小长度间隔。
Returns:
返回取点长度间隔。

getLineWidth()Number

获取线宽度(单位: 米)。
Returns:
飘带宽度。

getShowPntCount()Number

获取最大显示点数。
Returns:
最大显示点数。

getStreamerWidth()Number

获取飘带宽度和模型宽度的比值(模型宽度*width为飘带的真实宽度,若不是模型,则默认模型宽度为5)。
Returns:
飘带宽度。

getTrackColor()Color

获取初始线色。(接口已废弃)
Returns:
初始线色。

getTrackType()GeoEntityEffectTrackLineType

获取轨迹类型。
Returns:
轨迹类型。

setColorLightScale(colorLightScale)

设置颜色亮度缩放倍数。
Name Type Description
colorLightScale Number 颜色亮度缩放倍数。

setGeoEntityParameter(geoEntityParameter, linkGeoEntityUuid)

设置特效属性
Name Type Description
geoEntityParameter GeoEntityParameter 地理实体参数类
linkGeoEntityUuid String optional 实体的UUID

setGradients(aryColors)

设置渐变色颜色数组(最多支持5个)。
Name Type Description
aryColors Array 渐变色颜色数组。

setIntervalDistance(distance)

设置取点最小长度间隔。
Name Type Description
distance Number 取点长度间隔。

setLineWidth(width)

设置线宽度(单位: 米),当MGTrackType = AXES 时才起效。
Name Type Description
width Number 飘带宽度。

setShowPntCount(count)

设置最大显示点数,用于控制尾迹线的显示长度。当设置值小于零时,默认显示全部点。
Name Type Description
count Number 最大显示点数。

setStreamerWidth(width)

设置飘带宽度和模型宽度的比值(模型宽度*width为飘带的真实宽度,若不是模型,则默认模型宽度为5),当MGTrackType = STREAMER 时才起效。
Name Type Description
width Number 飘带宽度。

setTrackColor(color)

设置初始线色。(接口已废弃)
Name Type Description
color color 线色。

setTrackType(type)

设置轨迹类型。
Name Type Description
type GeoEntityEffectTrackLineType 轨迹类型。

toJSON()String

对象转Json字符串
Returns:
Json字符串