管道基础大数据平台系统开发-【前端】-新系統界面
src/views/exportMap/index.vue
@@ -508,7 +508,7 @@
        resolution: "20米",
        date: this.getYMD(),
        layers: res.toString(),
        rotation: this.form.role,
        rotation: this.formInline.role,
        xmin: this.layerExtent.xmin,
        ymin: this.layerExtent.ymin,
        xmax: this.layerExtent.xmax,
@@ -555,6 +555,7 @@
        mapView.removeLayer(this.vector)
      }
      this.layerExtent = null
      this.formInline.role = '';
    },
    stopDraw() {
      // if (this.draw !== null) {
@@ -743,22 +744,43 @@
    },
    //地图初始化
    initMap() {
      var TiandiLayer = new TileLayer({
      var TiandiLayer, GaoDeLayer;
      if (is_production) {
        var base_ulr = window.sceneConfig.baseUrl;
        if (base_ulr.indexOf('{host}') > -1) {
          base_ulr = base_ulr.replace("{host}", iisHost)
        }
        GaoDeLayer = new TileLayer({
          title: "高德地图",
          source: new XYZ({
            url: base_ulr,
            wrapX: false
          })
        });
        var base_ulr_sl = window.sceneConfig.baseUrl_sl;
        if (base_ulr_sl.indexOf('{host}') > -1) {
          base_ulr_sl = base_ulr_sl.replace("{host}", iisHost)
        }
        TiandiLayer = new TileLayer({
          source: new XYZ({
            url: base_ulr_sl,
          }),
        })
      } else {
        TiandiLayer = new TileLayer({
        source: new XYZ({
          url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",
        }),
      })
      var GaoDeLayer = new TileLayer({
        GaoDeLayer = new TileLayer({
        source: new XYZ({
          url: "http://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=6",
        }),
      })
      // var GaoDeTitle = new TileLayer({
      //   source: new XYZ({
      //     url: "http://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=8",
      //   }),
      // })
      }
      window.mapView = new Map({
        target: "mapView",
        layers: [TiandiLayer, GaoDeLayer],