liuyg
2022-01-08 5e47738f99e307bab1c8a5ee9ecd96d8c7f4a968
Merge branch 'master' of http://192.168.0.105:10010/r/school-web
1 files modified
30 ■■■■■ changed files
src/components/map/components/dimension.vue 30 ●●●●● patch | view | raw | blame | history
src/components/map/components/dimension.vue
@@ -320,6 +320,36 @@
                    //     that.areaLayer.show = false
                    // })
                    document.querySelector('.dc-zoom-controller').children[1].onclick = function () {
                        if (that.dimensionValue == '3 维') {
                            that.viewer.camera.setView({
                                // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
                                // fromDegrees()方法,将经纬度和高程转换为世界坐标
                                destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.04062292, 27.62666834, 220.0),
                                orientation: {
                                    // 指向
                                    heading: that.DC.Namespace.Cesium.Math.toRadians(-9),
                                    // 视角
                                    pitch: that.DC.Namespace.Cesium.Math.toRadians(-34.54),
                                    roll: 0.0
                                }
                            })
                        } else {
                            that.viewer.camera.setView({
                                // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
                                // fromDegrees()方法,将经纬度和高程转换为世界坐标
                                destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.039779, 27.629696, 600.0),
                                orientation: {
                                    // 指向
                                    heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                    // 视角
                                    pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
                                    roll: 0.0
                                }
                            })
                        }
                    }
                }
            }
        }