From 46b830a83dd6e0d572bdd21bad3f0c70abfc6b94 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 04 Jan 2022 14:47:05 +0800
Subject: [PATCH] +3D维视角放开
---
src/components/mobilemap/index.vue | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index b0d0d2f..32a9a11 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -240,6 +240,10 @@
viewer.on(that.DC.SceneEventType.CAMERA_CHANGED, (e) => {
//相机移动最后参数
//控制高度
+ if (that.dimension == "3D") {
+ console.log("3维不做高度限制");
+ }
+ let isSet = that.dimension == "3D" ? false : true;
const height = Math.ceil(viewer.camera.positionCartographic.height);
let conBack = (height) => {
viewer.camera.setView({
@@ -265,10 +269,10 @@
// if (height > 2000) {
// conBack(2000);
// }
- if (height < 500) {
+ if (height < 500 && isSet) {
conBack(500);
}
- if (height > 6000) {
+ if (height > 6000 && isSet) {
conBack(6000);
}
});
@@ -656,7 +660,7 @@
};
</script>
-<style lang='scss' scope>
+<style lang="scss" scope>
#mobile-viewer-container {
width: 100%;
height: 100%;
--
Gitblit v1.9.3