shuishen
2023-03-07 d7bbfe6156fa57f9ce5b1771a9c09498faaf91a9
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-07 10:56:33
 * @LastEditTime: 2023-03-07 11:18:45
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -54,6 +54,9 @@
                            <span :class="{ on: tilesetLayerType == 'high' }">高精</span>
                        </div>
                    </div>
                </div>
                <div class="angle-btn">
                    是否锁定视角:<el-checkbox v-model="angleCheck" @change="angleChange"></el-checkbox>
                </div>
            </div>
        </div>
@@ -206,7 +209,8 @@
            carTotal: 0,
            showImgBtn: false,
            imgtype: 0,
            tilesetLayerType: ''
            tilesetLayerType: '',
            angleCheck: true
        }
    },
@@ -525,6 +529,25 @@
    },
    methods: {
        angleChange (e) {
            if (e) {
                global.viewer.camera.flyTo({
                    destination: global.viewer.camera.position,
                    orientation: {
                        heading: global.viewer.camera.heading,
                        pitch: -45,
                        roll: global.viewer.camera.roll
                    },
                    duration: 0.0
                })
                global.viewer.setPitchRange(-90, -45)
            } else {
                global.viewer.setPitchRange(-90, 0)
            }
            this.showImgBtn = false
        },
        /**
         * @description: 高精度模型和轻量模型切换
         * @param {*} type