| | |
| | | waterSimulateParams.value = form; |
| | | } |
| | | function endSimulate() { |
| | | // showDebuffDetail.value = true |
| | | showDebuffDetail.value = false |
| | | clearTrailLine(); |
| | | removeDataSources(); |
| | | setTimeout(() => { |
| | | showWaterSimulate.value = false; |
| | |
| | | // 设置样式,将颜色改为红色 |
| | | dataSource.entities.values.forEach((entity) => { |
| | | entity.polygon.material = new Cesium.Color(1.0, 0.0, 0.0, 0.6); // 红色,80% 不透明度 |
| | | entity.polygon.outlineColor = Cesium.Color.YELLOW; // 设置轮廓颜色为红色(如果需要) |
| | | entity.polygon.outline = true; // 显示轮廓(如果需要) |
| | | entity.polygon.outlineColor = Cesium.Color.YELLOW; |
| | | entity.polygon.outline = true; |
| | | }); |
| | | |
| | | // 添加数据源到 viewer |
| | |
| | | ); |
| | | TrailLine.push(_TrailLine); |
| | | } |
| | | // 清除轨迹线对象 |
| | | function clearTrailLine() { |
| | | TrailLine.forEach((item, index) => { |
| | | if (item && typeof item.deleteObject === 'function') { |
| | | item.deleteObject(); |
| | | } else if (item && typeof item.clear === 'function') { |
| | | item.clear(); |
| | | } else if (item && earthCtrl && earthCtrl.coreMap) { |
| | | earthCtrl.coreMap.entities.remove(item); |
| | | } |
| | | }); |
| | | TrailLine = []; |
| | | } |
| | | // function showLine() { |
| | | // earthCtrl.factory.createSimpleGraphic( |
| | | // "polyline", |