使用产品:iClient3D 10i 操作系统:win10 x64
问题详细描述:案例中提供的尾迹线效果,如果不采用贴地显示时,可以实现沿线轨迹的流动效果;但是设置 ''ClampToGround:true''后,会变成整条轨迹线贴附地形显示,没有动态流动效果了,如何解决这一问题。代码示例如下:去除高程后的二维线也尝试过,存在一样的问题
let pathCoordinate = [
113.58415407228927, 38.6678444488882,2500,
113.59703156743137, 38.66941754801485,2500,
113.60008701026499, 38.67009328478352,2500,
113.60442710393379, 38.67155169127162,2500,
113.60964151472955, 38.68133640915031,2500,
113.61161061013271, 38.672180163783416,2500,
113.61647613221174, 38.67418847567552,2500,
113.62409161952986, 38.67714155396649,2500,
113.62156366311115, 38.667142572636195,2500
];
let vpolygon0=viewer.entities.add({
show:true,
polyline: {
positions: Cesium.Cartesian3.fromDegreesArrayHeights(pathCoordinate),
width: 5,
material:Cesium.Color.RED.withAlpha(0.5),
clampToGround: true
},
});
let vpolygon=viewer.entities.add({
show:true,
polyline: {
positions: Cesium.Cartesian3.fromDegreesArrayHeights(pathCoordinate),
width: 10,
material: new Cesium.PolylineTrailMaterialProperty({ // 尾迹线材质
color: Cesium.Color.fromCssColorString("rgba(118, 233, 241, 1.0)"),
trailLength: 0.1,
period: 5.0,
constantSpeed:1000
}),
clampToGround: true
},
});
viewer.zoomTo(vpolygon);