使用产品: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函数报错
补充:昨天有大大给我发了一个包,但是那个包会导致我的模型自发光纹理无法应用
hyp.emissionTextureArray = [
{
url:"../image/speedline.jpg",
USpeed:0.25,
VSpeed:0,
UTiling:100,
VTiling:100
}
]
hyp.ColorTable = colorTable;
setHypsometric1(layer_baimo, hyp);
function setHypsometric1(layer, hyp) {
layer.hypsometricSetting = {
hypsometricSetting: hyp,
analysisMode: Cesium.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL
}
}