From d1bb48c40e1228e4ab43a68dc41da64ac40e65ef Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 09 Feb 2022 16:47:17 +0800
Subject: [PATCH] +移动端点击输入框会缩放页面
---
src/components/mobilemap/index.vue | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index a41a9ae..ac9dca2 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -31,7 +31,7 @@
<!-- 盖住左下角 -->
<div class="cover_mobileMap">智慧社区</div>
<!-- 指示器 -->
- <div class="heights">{{ heights }}---{{ heights1 }}</div>
+ <!-- <div class="heights">{{ heights }}---{{ heights1 }}</div> -->
</div>
</template>
<script>
@@ -310,13 +310,12 @@
const height = Math.ceil(
viewer.camera.positionCartographic.height
);
-
- if (height > 360) {
+ if (height > 180) {
viewer.camera.setView({
destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
viewer.camera.positionCartographic.longitude,
viewer.camera.positionCartographic.latitude,
- 330
+ 160
),
orientation: {
// 指向
@@ -330,12 +329,12 @@
return;
}
- if (height > 300) {
+ if (height > 140) {
viewer.camera.setView({
destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
viewer.camera.positionCartographic.longitude,
viewer.camera.positionCartographic.latitude,
- 270
+ 120
),
orientation: {
// 指向
@@ -349,12 +348,12 @@
return;
}
- if (height > 240) {
+ if (height > 100) {
viewer.camera.setView({
destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
viewer.camera.positionCartographic.longitude,
viewer.camera.positionCartographic.latitude,
- 200
+ 80
),
orientation: {
// 指向
@@ -374,13 +373,14 @@
const height = Math.ceil(
viewer.camera.positionCartographic.height
);
+ console.log(height);
- if (height <= 240) {
+ if (height <= 100) {
viewer.camera.setView({
destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
viewer.camera.positionCartographic.longitude,
viewer.camera.positionCartographic.latitude,
- 270
+ 120
),
orientation: {
// 指向
@@ -392,12 +392,12 @@
});
}
- if (height > 240 && height <= 300) {
+ if (height > 100 && height <= 140) {
viewer.camera.setView({
destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
viewer.camera.positionCartographic.longitude,
viewer.camera.positionCartographic.latitude,
- 330
+ 160
),
orientation: {
// 指向
@@ -409,12 +409,12 @@
});
}
- if (height > 300 && height < 360) {
+ if (height > 140 && height < 180) {
viewer.camera.setView({
destination: that.DC.Namespace.Cesium.Cartesian3.fromRadians(
viewer.camera.positionCartographic.longitude,
viewer.camera.positionCartographic.latitude,
- 400
+ 200
),
orientation: {
// 指向
--
Gitblit v1.9.3