liuyg
2022-03-18 763aab93e168fbfee035301a36e68b8b6a64f285
修改适应高度,改路线样式
2 files modified
102 ■■■■■ changed files
src/components/mobilemap/index.vue 80 ●●●●● patch | view | raw | blame | history
src/store/modules/mobile.js 22 ●●●● patch | view | raw | blame | history
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") {
src/store/modules/mobile.js
@@ -959,8 +959,15 @@
            const color =
                global.DC.Namespace.Cesium.Color.fromCssColorString('#409EFF')
            window.polylinematerialdaohang = new global.DC.PolylineTrailMaterialProperty({
                color: color,
                speed: 10
                // color: color,
                // speed: 10
                color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
                speed: 60,
                image: '/img/icon/right.png',
                repeat: {
                    x: 320,
                    y: 1
                }
            })
            window.drawALineLayer = new global.DC.VectorLayer('lineLayer')
            global.viewer.addLayer(window.drawALineLayer)
@@ -1035,9 +1042,16 @@
            //     speed: 10
            // })
            window.drawALineLayerManyStyle = new global.DC.PolylineImageTrailMaterialProperty({
                color: window.drawALineLayerManycolor,
                // color: window.drawALineLayerManycolor,
                // speed: 60,
                // image: 'img/icon/right.png',
                // repeat: {
                //     x: 320,
                //     y: 1
                // }
                color: global.DC.Namespace.Cesium.Color.fromBytes(10, 255, 10),
                speed: 60,
                image: 'img/icon/right.png',
                image: '/img/icon/right.png',
                repeat: {
                    x: 320,
                    y: 1