管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-08-14 04dae190af26730e8e0dcfb7cb4ec066400422f3
src/views/Tools/AddOnlineMap.vue
@@ -130,7 +130,7 @@
        list: [{
          name: "Cesium影像",
          image: require("../../assets/img/imageLayer/tdmap_image.jpg"),
          urls: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
        },],
      },
@@ -184,7 +184,7 @@
      }, {
        name: '本地服务',
        sourceType: 'localmap',
        maximumLevel: 18,
        maximumLevel: 22,
        id: 3,
        isShow: true,
        list: [
@@ -200,10 +200,14 @@
          },
          {
            name: "地形",
            image: require("../../assets/img/imageLayer/tdmap_label.jpg"),
            image: require("../../assets/img/imageLayer/dixing.png"),
            urls: "http://{host}/LFData/2d/tiles/ter/{z}/{x}/{y}.png",
          },
          {
            name: "1:20万区域地质图",
            image: require("../../assets/img/imageLayer/25dizhi.png"),
            urls: "http://{host}/LFData/2d/tiles/20w_qydz/{z}/{x}/{y}.png",
          },
        ],
      }
@@ -233,6 +237,7 @@
    open() {
      this.close(true);
      this.$refs.pop.open();
    },
    changeToken(token) {
      this.mapCollection.tokne = token;
@@ -244,6 +249,11 @@
        window.BaseMapLayer
      );
      window.map.removeLayer(window.olBaseMapLayer);
      if (!is_production) {
        if (window.vectorLayer) {
          window.map.removeLayer(window.vectorLayer);
        }
      }
    },
    addImageLayer(map, mapCollection) {
@@ -258,8 +268,18 @@
      this.mapCollection = mapCollection;
      if (mapCollection.sourceType === "cesium") {
        window.olBaseMapLayer = new TileLayer({
          title: "高德地图",
          source: new XYZ({
            url: map.urls,
            wrapX: false
          }),
          zIndex: -1
        });
        window.map.addLayer(window.olBaseMapLayer);
        return;
      } else if (mapCollection.sourceType === "tdmap") {
        var tokne = mapCollection.tokne;
        //添加天地图影像
@@ -270,6 +290,7 @@
          format: "image/jpeg",
          tileMatrixSetID: "GoogleMapsCompatible",
        }))
        window.olBaseMapLayer = new TileLayer({
          title: "高德地图",
          source: new XYZ({
@@ -284,7 +305,7 @@
        window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider(
          new Cesium.UrlTemplateImageryProvider({
            url: map.urls,
            maximumLevel: 18,
            maximumLevel: 22,
          })
        );
@@ -304,7 +325,7 @@
        window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider(
          new Cesium.UrlTemplateImageryProvider({
            url: ulr,
            maximumLevel: 18,
            maximumLevel: 22,
          })
        );
@@ -319,16 +340,12 @@
        window.map.addLayer(window.olBaseMapLayer);
      }
      Viewer.imageryLayers.lowerToBottom(window.BaseMapLayer);//将图层移到最底层
      Viewer.imageryLayers.raise(window.BaseMapLayer);//将图层移到最底层
      Viewer.imageryLayers.raise(window.BaseMapLayer);//将图层上移一层
      if (is_production) {
        Viewer.imageryLayers.raise(window.BaseMapLayer);//将图层上移一层
      }
    },
    // 添加数据
    addData() {
      if (this.data.urls && this.data.sourceType) {