From 763aab93e168fbfee035301a36e68b8b6a64f285 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Fri, 18 Mar 2022 15:04:41 +0800
Subject: [PATCH] 修改适应高度,改路线样式
---
src/components/mobilemap/index.vue | 80 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 76 insertions(+), 4 deletions(-)
diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 928e127..180030b 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -127,8 +127,12 @@
towlayerNum: 140,
threelayerNum: 170,
forlayerNum: 200,
+
+ fivelayerNum: 230,
+ sixlayerNum: 260,
+
intervallayerNum: 15,
- frislayertHeight: 200, //默认高度
+ frislayertHeight: 170, // 默认高度
};
},
computed: {
@@ -287,7 +291,8 @@
// if (height > 200 && isSet) {
// conBack(200);
// }
- const usMun = that.forlayerNum ? that.forlayerNum : that.threelayerNum;
+ // const usMun = that.forlayerNum ? that.forlayerNum : that.threelayerNum;
+ const usMun = that.sixlayerNum;
if (window.height1s > usMun && isSet) {
window.conBack(usMun);
}
@@ -334,6 +339,24 @@
// if (height > 100) {
// butSetViews(80);
// }
+ if (that.sixlayerNum) {
+ if (
+ window.height2s >
+ that.sixlayerNum - that.intervallayerNum
+ ) {
+ window.butSetViews(that.fivelayerNum);
+ return;
+ }
+ }
+ if (that.fivelayerNum) {
+ if (
+ window.height2s >
+ that.fivelayerNum - that.intervallayerNum
+ ) {
+ window.butSetViews(that.forlayerNum);
+ return;
+ }
+ }
if (that.forlayerNum) {
if (
window.height2s >
@@ -399,6 +422,22 @@
window.butSetViews(that.forlayerNum);
}
}
+ if (that.fivelayerNum) {
+ if (
+ window.height3s > that.forlayerNum - that.intervallayerNum &&
+ window.height3s < that.fivelayerNum - that.intervallayerNum
+ ) {
+ window.butSetViews(that.fivelayerNum);
+ }
+ }
+ if (that.sixlayerNum) {
+ if (
+ window.height3s > that.fivelayerNum - that.intervallayerNum &&
+ window.height3s < that.sixlayerNum - that.intervallayerNum
+ ) {
+ window.butSetViews(that.sixlayerNum);
+ }
+ }
}
};
// 滚轮事件
@@ -442,7 +481,7 @@
ii++;
cutHeight = window.height4s - startHeight;
// console.log(cutHeight);
- // that.heights = height;
+ // that.heights = window.height4s;
// that.heights1 = cutHeight;
// return;
if (isCameraTime) {
@@ -490,6 +529,22 @@
window.setViews(that.forlayerNum);
}
}
+ if (that.fivelayerNum) {
+ if (
+ window.height4s >= that.forlayerNum + 2 &&
+ window.height4s < that.fivelayerNum
+ ) {
+ window.setViews(that.fivelayerNum);
+ }
+ }
+ if (that.sixlayerNum) {
+ if (
+ window.height4s >= that.fivelayerNum + 2 &&
+ window.height4s < that.sixlayerNum
+ ) {
+ window.setViews(that.sixlayerNum);
+ }
+ }
}
// 放大
} else {
@@ -505,6 +560,22 @@
// setViews(80);
// }
if (cutHeight < -2) {
+ if (that.sixlayerNum) {
+ if (
+ window.height4s <= that.sixlayerNum &&
+ window.height4s > that.fivelayerNum - 2
+ ) {
+ window.setViews(that.fivelayerNum);
+ }
+ }
+ if (that.fivelayerNum) {
+ if (
+ window.height4s <= that.fivelayerNum &&
+ window.height4s > that.forlayerNum - 2
+ ) {
+ window.setViews(that.forlayerNum);
+ }
+ }
if (that.forlayerNum) {
if (
window.height4s <= that.forlayerNum &&
@@ -974,7 +1045,8 @@
that.$store.commit("set_frislayertHeight", that.frislayertHeight); // 送入默认弹窗高度
that.$store.commit("set_zoomRange", [
that.onelayerNum,
- that.forlayerNum ? that.forlayerNum : that.threelayerNum,
+ // that.forlayerNum ? that.forlayerNum : that.threelayerNum,
+ that.sixlayerNum,
]); // 送入移动端缩放范围
that.$store.commit("MSET_DIMENSION", "2.5D"); // 切换2.5D设置
} else if (that.dimension == "3D") {
--
Gitblit v1.9.3