派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-01-09 da21171cc9b248ad9c7f062e41f039eceb910c23
src/components/helpers/ServiceLayerHelper.js
@@ -10,6 +10,7 @@
    this.L = options.L
    this.tileLayersMap = new Map()
    this.tileLayersWMSArray = []
    this.tileLayerWmslayerGroup = L.layerGroup().addTo(this.map)
    this.tileLayersWMTSArray = []
    this.tileLayersTileArray = []
    this.mapConfig = {}
@@ -72,7 +73,7 @@
    layer.config = config
    if (isAddToMap) {
      layer.addTo(this.map)
      layer.addTo(this.tileLayerWmslayerGroup)
    }
    this.tileLayersMap.set(options.code, layer)
    this.tileLayersWMSArray.push(layer)
@@ -152,7 +153,7 @@
  getWMSConfig (code) {
    const mc = this.mapConfig
    for (let i = 0, len = mc.mapConfig.ServiceLayers.length; i < len; ++i) {
      if (code == mc.mapConfig.ServiceLayers[i].code && mc.mapConfig.ServiceLayers[i].type === 'wms') {
      if (code === mc.mapConfig.ServiceLayers[i].code && mc.mapConfig.ServiceLayers[i].type === 'wms') {
        return mc.mapConfig.ServiceLayers[i]
      }
    }