派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-04-29 bd51480c21f012910e0516ade9595a345673004a
wms全选BUG
3个文件已修改
17 ■■■■■ 已修改文件
src/Sgis.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/service/WmsLayerService.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/layers/LayerPipeLines.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Sgis.js
@@ -28,10 +28,6 @@
  const option = mapOption || MapConfig.mapOptions
  map = L.map(div, option)
  map.on('click', (event, a, b) => {
    console.log(event, a, b)
  })
  // eventBus.$emit('map-obj', map)
  window.map = map
src/components/LayerController/service/WmsLayerService.js
@@ -45,14 +45,13 @@
  }
  add (config) {
    const code = config.code
    for (var k in this.layersConfig) {
      if (code === k) {
        return false
    const wmsLayers = config.wmsLayers
    if (wmsLayers) {
      if (this.layers.indexOf(wmsLayers) < 0) {
        this.layers.push(config.wmsLayers)
        this.wmsLayer.setParams({ layers: this.layers.join(',') })
      }
    }
    this.layers.push(config.wmsLayers)
    this.wmsLayer.setParams({ layers: this.layers.join(',') })
  }
  remove (config) {
src/conf/layers/LayerPipeLines.js
@@ -35,7 +35,7 @@
      name: '事故水线',
      sname: '事故水',
      checked: false,
      wmsLayers: 'sewer:pipeline_accident',
      // wmsLayers: 'sewer:pipeline_accident',
      type: 0,
      minZoom: 13,
      wfs: WFS_URL + '?TYPENAME=事故水'