| | |
| | | towlayerNum: 120, |
| | | threelayerNum: 160, |
| | | forlayerNum: 200, |
| | | intervallayerNum: 20, |
| | | frislayertHeight: 160, //默认高度 |
| | | // onelayerNum: 80, |
| | | // towlayerNum: 200, |
| | | // threelayerNum: 320, |
| | | // forlayerNum: 440, |
| | | // intervallayerNum: 60, |
| | | // frislayertHeight: 320, //默认高度 |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | duration: 0.5, // 定位的时间间隔 |
| | | }); |
| | | overii(); |
| | | // overii(); |
| | | }; |
| | | that.butbut = function () { |
| | | //放大 |
| | |
| | | // if (height > 100) { |
| | | // butSetViews(80); |
| | | // } |
| | | if (height > 180) { |
| | | butSetViews(160); |
| | | if (height > that.forlayerNum - that.intervallayerNum) { |
| | | butSetViews(that.threelayerNum); |
| | | return; |
| | | } |
| | | |
| | | if (height > 140) { |
| | | butSetViews(120); |
| | | if (height > that.threelayerNum - that.intervallayerNum) { |
| | | butSetViews(that.towlayerNum); |
| | | return; |
| | | } |
| | | |
| | | if (height > 100) { |
| | | butSetViews(80); |
| | | if (height > that.towlayerNum - that.intervallayerNum) { |
| | | butSetViews(that.onelayerNum); |
| | | } |
| | | } |
| | | }; |
| | |
| | | ); |
| | | console.log(height); |
| | | |
| | | if (height <= 100) { |
| | | butSetViews(120); |
| | | // if (height <= 100) { |
| | | // butSetViews(120); |
| | | // } |
| | | |
| | | // if (height > 100 && height <= 140) { |
| | | // butSetViews(160); |
| | | // } |
| | | |
| | | // if (height > 140 && height < 180) { |
| | | // butSetViews(200); |
| | | // } |
| | | |
| | | if (height <= that.towlayerNum - that.intervallayerNum) { |
| | | butSetViews(that.towlayerNum); |
| | | } |
| | | |
| | | if (height > 100 && height <= 140) { |
| | | butSetViews(160); |
| | | if ( |
| | | height > that.towlayerNum - that.intervallayerNum && |
| | | height <= that.threelayerNum - that.intervallayerNum |
| | | ) { |
| | | butSetViews(that.threelayerNum); |
| | | } |
| | | |
| | | if (height > 140 && height < 180) { |
| | | butSetViews(200); |
| | | if ( |
| | | height > that.threelayerNum - that.intervallayerNum && |
| | | height < that.forlayerNum - that.intervallayerNum |
| | | ) { |
| | | butSetViews(that.forlayerNum); |
| | | } |
| | | } |
| | | }; |
| | |
| | | ii++; |
| | | cutHeight = height - startHeight; |
| | | // console.log(cutHeight); |
| | | // console.log(height); |
| | | console.log(height, "see"); |
| | | that.heights = height; |
| | | that.heights1 = cutHeight; |
| | | // return; |
| | |
| | | let takes = () => { |
| | | if (ii != 1) { |
| | | if (cutHeight >= 0) { |
| | | if (cutHeight > 3) { |
| | | if (height >= 83 && height < 120) { |
| | | setViews(120); |
| | | if (cutHeight > 2) { |
| | | // if (height >= 83 && height < 120) { |
| | | // setViews(120); |
| | | // } |
| | | // if (height >= 123 && height < 160) { |
| | | // setViews(160); |
| | | // } |
| | | // if (height >= 163 && height < 200) { |
| | | // setViews(200); |
| | | // } |
| | | if ( |
| | | height >= that.onelayerNum + 2 && |
| | | height < that.towlayerNum |
| | | ) { |
| | | setViews(that.towlayerNum); |
| | | } |
| | | if (height >= 123 && height < 160) { |
| | | setViews(160); |
| | | if ( |
| | | height >= that.towlayerNum + 2 && |
| | | height < that.threelayerNum |
| | | ) { |
| | | setViews(that.threelayerNum); |
| | | } |
| | | if (height >= 163 && height < 200) { |
| | | setViews(200); |
| | | if ( |
| | | height >= that.threelayerNum + 2 && |
| | | height < that.forlayerNum |
| | | ) { |
| | | setViews(that.forlayerNum); |
| | | } |
| | | } |
| | | //放大 |
| | | } else { |
| | | //缩小 |
| | | if (cutHeight < -3) { |
| | | if (height <= 200 && height > 157) { |
| | | setViews(160); |
| | | // if (cutHeight < -3) { |
| | | // if (height <= 200 && height > 157) { |
| | | // setViews(160); |
| | | // } |
| | | // if (height <= 157 && height > 117) { |
| | | // setViews(120); |
| | | // } |
| | | // if (height <= 117 && height > 80) { |
| | | // setViews(80); |
| | | // } |
| | | if (cutHeight < -2) { |
| | | if ( |
| | | height <= that.forlayerNum && |
| | | height > that.threelayerNum - 2 |
| | | ) { |
| | | setViews(that.threelayerNum); |
| | | } |
| | | if (height <= 157 && height > 117) { |
| | | setViews(120); |
| | | if ( |
| | | height <= that.threelayerNum - 2 && |
| | | height > that.towlayerNum - 2 |
| | | ) { |
| | | setViews(that.towlayerNum); |
| | | } |
| | | if (height <= 117 && height > 80) { |
| | | setViews(80); |
| | | if ( |
| | | height <= that.towlayerNum - 2 && |
| | | height > that.onelayerNum |
| | | ) { |
| | | setViews(that.onelayerNum); |
| | | } |
| | | } |
| | | } |
| | |
| | | //判断默认维度 |
| | | //原本默认是2.5d 改为3d默认时做出改变 |
| | | if (that.dimension == "2.5D") { |
| | | that.$store.commit("set_frislayertHeight", that.frislayertHeight); //送入默认弹窗高度 |
| | | that.$store.commit("set_zoomRange", [ |
| | | that.onelayerNum, |
| | | that.forlayerNum, |
| | | ]); //送入移动端缩放范围 |
| | | that.$store.commit("MSET_DIMENSION", "2.5D"); //切换2.5D设置 |
| | | } else if (that.dimension == "3D") { |
| | | // setTimeout((res) => { |
| | |
| | | that.$store.dispatch("setMobileWindows", d); |
| | | }, |
| | | flytos(jd, wd) { |
| | | let height = this.frislayertHeight; |
| | | this.$store.dispatch("mapFlyTo", { |
| | | lntLat: [jd, wd, 120], //114.04020791, 27.62934732 |
| | | lntLat: [jd, wd, height], //114.04020791, 27.62934732 |
| | | heading: 0, |
| | | pitch: -90, |
| | | roll: 0, |