派生自 wuyushui/SewerAndRainNetwork

XingChuan
2021-05-31 1cbe8bd51a055179866476e7cc8463754905449e
src/components/helpers/MapManager.js
@@ -28,9 +28,12 @@
      // console.log(e)
      this.clearHighlight()
      this.loadWfsDatas(e.latlng).then((res) => {
        console.log(res)
        highlight(res.features)
        openPropsPopup(e.latlng, res.features)
        if (res.features.length > 0) {
          highlight(res.features[0])
          if (this.clickDialogSwitch) {
            openPropsPopup(e.latlng, res.features)
          }
        }
      })
    })
  }
@@ -41,7 +44,7 @@
      var point = this.map.latLngToContainerPoint(latlng, this.map.getZoom())
      const wmsLayerService = window.layerFactory.wmsLayerService
      const layers = wmsLayerService.wmsLayerList.getLayers()
      // const filters = wmsLayerService.wmsLayerList.getFilters()
      const filters = wmsLayerService.wmsLayerList.getFilters()
      const wmsParams = Object.assign({
        LAYERS: layers,
        QUERY_LAYERS: layers,
@@ -51,6 +54,9 @@
        Y: Math.round(point.y),
        BBOX: this.map.getBounds().toBBoxString()
      }, this.defaultWmsParams, params)
      if (filters) {
        wmsParams.CQL_FILTER = filters
      }
      AjaxUtils.get4JsonDataByUrl(WMS_URL, wmsParams, (res) => {
        resolve(res.data)
      })