赣州市洪水风险预警系统三维版本
guoshilong
2023-02-23 79242d459814184fc42403d8212ffc25611d4758
widgets/FloodAnalysis/Widget.js
@@ -430,26 +430,21 @@
                cartesians.push(new Cesium.Cartesian3.fromDegrees(data[i].lng, data[i].lat,data[i].sw))
                let temp = this.map.entities.add({
                    position: Cesium.Cartesian3.fromDegrees(data[i].lng, data[i].lat,data[i].sw),
                    point: {
                        color: Cesium.Color.fromBytes(0, 255, 0),
                        pixelSize: 11,
                        //防止地形遮挡住点
                        disableDepthTestDistance: Number.POSITIVE_INFINITY,
                        heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
                    },
                    billboard:{
                        image: "./images/jiangshui_sq.png",
                        pixelOffset: new Cesium.Cartesian2(0, 0),
                        color: new Cesium.Color(20, 20, 0, 1),
                        width: 14,
                        height: 14,
                        heightReference : Cesium.HeightReference.CLAMP_TO_GROUND,
                        disableDepthTestDistance: Number.POSITIVE_INFINITY
                    }
                });
                // 清空使用
                pointEntities.push(temp)
            }
            //防止切换面板后渲染水面出错
            this.map.scene.globe.depthTestAgainstTerrain = true;
            //防止切换面板后渲染点位过小
            if (this.map.entities.values.length>pointEntities.length){
                for (var i = 0; i < pointEntities.length; i++) {
                    this.pointEntities[i].point.pixelSize._value=30;
                    this.pointEntities[i].point.color._value=Cesium.Color.fromBytes(0, 255, 0);
                }
            }
            // 先清空 后画线
            if (this.drawingPolyline){
@@ -526,9 +521,7 @@
                            break;
                        }
                    }
                    pageElementId == "analysis-pagination" ? self.createList(listdata,"洪水淹没分析") : self.createList(listdata,"历史风险图")
                }
            });