From ca2a7113f660f523518c4be431534e7eebaa297e Mon Sep 17 00:00:00 2001
From: XingChuan <m17600301067@163.com>
Date: 星期日, 30 五月 2021 12:37:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop

---
 src/components/helpers/MapManager.js |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/components/helpers/MapManager.js b/src/components/helpers/MapManager.js
index 8399486..c3ec889 100644
--- a/src/components/helpers/MapManager.js
+++ b/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)
       })

--
Gitblit v1.8.0