From 253590ef9d0ec11b526321c2c18d60c53990fd45 Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期一, 19 四月 2021 13:09:14 +0800
Subject: [PATCH] 弹框修改
---
src/components/LayerController/service/WfsLayerService.js | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js
index b263e46..e1bd4a5 100644
--- a/src/components/LayerController/service/WfsLayerService.js
+++ b/src/components/LayerController/service/WfsLayerService.js
@@ -1,7 +1,6 @@
/**
* 鍔犺浇涓氬姟鏁版嵁鍥惧眰
*/
-
import { STYLES } from '../../../conf/Constants'
import AjaxUtils from '../../../utils/AjaxUtils'
@@ -11,8 +10,8 @@
this.params = {
version: '1.0.0',
REQUEST: 'getfeature',
- OUTPUTFORMAT: 'json',
- maxFeatures: 20000
+ OUTPUTFORMAT: 'json'
+ // maxFeatures: 20000
}
this.popupComp = window.popupComp
this.L = window.L
@@ -30,14 +29,15 @@
loadData (wfsUrl) {
AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => {
- console.log(res)
this.draw(res.data.features)
})
}
draw (features) {
const icon = this.config.icon
- this.L.geoJSON(features, {
+ const styles = this.config.styles
+ Object.assign(STYLES, styles)
+ const geojsonLayer = this.L.geoJSON(features, {
style: function (feature) {
return {
fill: STYLES.FILL,
@@ -75,6 +75,7 @@
.on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer))
}
}).addTo(this.layer)
+ window.layerFactory.setZIndex(geojsonLayer)
}
mouseOverListener (e, layer) {
--
Gitblit v1.8.0