From 57b93c75dac23bd9b4c8400d32169eaef62414d5 Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期五, 14 五月 2021 15:52:17 +0800 Subject: [PATCH] 点击弹窗加筛选条件 --- src/components/LayerController/service/WmsLayerService.js | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/components/LayerController/service/WmsLayerService.js b/src/components/LayerController/service/WmsLayerService.js index 076340e..fbc74bd 100644 --- a/src/components/LayerController/service/WmsLayerService.js +++ b/src/components/LayerController/service/WmsLayerService.js @@ -92,6 +92,7 @@ var size = this.map.getSize() // const bbox = this.L.latLngBounds(this.L.latLng(e.latlng.lng, e.latlng.lat)).toBBoxString() const layers = this.wmsLayerList.getLayers() + const filter = this.wmsLayerList.getFilters() if (layers.length > 0) { const params = Object.assign({ LAYERS: layers, @@ -102,6 +103,9 @@ Y: Math.round(point.y), BBOX: this.map.getBounds().toBBoxString() }, this.params) + if (filter.length > 0) { + params.cql_filter = filter + } AjaxUtils.get4JsonDataByUrl(WMS_URL, params, (res) => { const features = res.data.features /** -- Gitblit v1.8.0