使用产品:SuperMap_iClient3D_10i(2020)_sp1_for_WebGL 操作类型:win10 x64
问题详细描述:
添加道路尾迹线效果之后想要移除,触发viewer.dataSources.remove(roadSource)函数的时候控制台报错,并且移除失败
let promiseroute = Cesium.GeoJsonDataSource.load('XXX');
promiseroute.then(function (roadSource) {
roadSource.name = 'road_poly';
viewer.dataSources.add(roadSource);
var road = roadSource.entities.values;
for (let i = 0; i < road.length; i++) {
let line = road[i];
line.polyline.material = new Cesium.PolylineTrailMaterialProperty({
color: 'XXX',
trailLength: 'XXX',
period: 'XXX',
});
line.polyline.width = 'XXX';
}
......
viewer.dataSources.remove(roadSource); //remove函数报错