问题: Cesium.GeoJsonDataSource.load设置polygon.outline被销毁时报错message: 'This object was destroyed, i.e., destroy() was called.'
销毁: cesuimMap.viewer.dataSources.removeAll(true);
报错: message: 'This object was destroyed, i.e., destroy() was called.'
发现: cesium原生的dataSources.removeAll和被二次封装的removeAll代码不一样
设置: let dataSource = await Cesium.GeoJsonDataSource.load(data); const entities = dataSource.entities.values; for (const key in entities) { const entity = entities[key]; if (entity.polygon) { entity.polygon.outline = false; entity.polygon.outlineWidth = 2; entity.polygon.extrudedHeight = 50;