派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-03-02 1bbd2b05db1860bfa44acc57f27db507be974f16
src/components/helpers/ServiceLayerHelper.js
@@ -17,6 +17,7 @@
    this.geojsonArray = {} // 初始的geojson集
    this.layerConfig = {}
    this.regex = /\{(.+?)\}/g // 匹配{}
    this.popupComp = null
  }
  getTileLayer (code) {
@@ -26,10 +27,11 @@
  /**
     * 根据配置文件初始化业务底图
     */
  initServiceLayers (layerConfig) {
  initServiceLayers (layerConfig, popupComp) {
    this.layerConfig = layerConfig
    this.popupComp = popupComp
    this.loadLayers(layerConfig.mapConfig.Layers.LayerSewersLine)
    // this.loadLayers(layerConfig.mapConfig.Layers.layerSewersPoint)
    this.loadLayers(layerConfig.mapConfig.Layers.layerSewersPoint)
  }
  /**
@@ -116,6 +118,14 @@
          })
      }
    }).bindPopup(function (layer) {
      that.popupComp.setDatas(layer)
      that.popupComp.setShow()
      return that.popupComp.$el
    }, {
      className: 's-map-popup',
      minWidth: 300,
      closeButton: false,
      autoClose: false
    }).addTo(featureGroup).bringToFront()
    return featureGroup
  }