liuyg
2022-01-18 1b65bf157e9d1852bf819bcebcdbf596b77ae6b9
src/components/map/components/dimension.vue
@@ -28,7 +28,6 @@
            // 标注
            cvaLayer: null,
            // 建筑2.5D面数据
            areaLayer: null,
            provider: null,
            wallLayer: null,
            tileset: null,
@@ -72,6 +71,7 @@
            ]
        }
    },
    props: ['areaLayer'],
    computed: {
        ...mapGetters([
            'viewer',
@@ -270,7 +270,7 @@
                    //             })
                    //         }
                    //     })
                    // }, 2400)
                    // }, 1000)
                    that.titlesetLayerFlag = true
                    that.viewer.camera.setView({
@@ -290,10 +290,10 @@
                    // 最小
                    that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 200
                    // 最大
                    that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 2400
                    that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 1000
                    // 设置相机缩小时的速率
                    // that.viewer.scene.screenSpaceCameraController._minimumZoomRate = 24000
                    // that.viewer.scene.screenSpaceCameraController._minimumZoomRate = 10000
                    // 设置相机放大时的速率
                    that.viewer.scene.screenSpaceCameraController._maximumZoomRate = 5906376272000
                    // 视角平移
@@ -302,9 +302,6 @@
                    that.viewer.scene.screenSpaceCameraController.enableZoom = true
                    // 视角旋转
                    that.viewer.scene.screenSpaceCameraController.enableTilt = false
                    that.areaLayer = new that.DC.VectorLayer('areaLayer')
                    that.viewer.addLayer(that.areaLayer)
                    axios.get('http://arcgis.jxpskj.com:6080/arcgis/rest/services/lxxqwxq/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=pjson').then(resultData => {
                        resultData.data.features.forEach(item => {
@@ -333,7 +330,7 @@
                    }
                    that.viewer.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
                        if (e.overlay != undefined) {
                        if (e.overlay != undefined && e.layer.id == 'areaLayer') {
                            if (select.overlay != undefined) {
                                if (e.overlay != select.overlay) {
                                    select.overlay.setStyle({
@@ -532,7 +529,7 @@
                // 最小
                that.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 200
                // 最大
                that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 2400
                that.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 1000
                // 视角旋转
                that.viewer.scene.screenSpaceCameraController.enableTilt = false
            }
@@ -564,9 +561,9 @@
                    }
                })
            };
            if (height > 2400) {
            if (height > 1000) {
                that.viewer.camera.setView({
                    destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(that.viewer.camera.positionCartographic.longitude, that.viewer.camera.positionCartographic.latitude, 2400),
                    destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(that.viewer.camera.positionCartographic.longitude, that.viewer.camera.positionCartographic.latitude, 1000),
                    orientation: {
                        // 指向
                        heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),