From c98cd1d07a99883d4bd2b9833ce7e91e56a6f1fb Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期一, 19 四月 2021 14:06:08 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/LayerController/service/WfsLayerService.js |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js
index 3aae541..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,
@@ -45,9 +45,9 @@
           fillColor: STYLES.FILL_COLOR,
           color: STYLES.COLOR,
           fillOpacity: STYLES.FILL_OPACITY,
-          opacity: STYLES.OPACITY,
-          dashArray: STYLES.DASH_ARRAY,
-          dashSpeed: STYLES.DASH_SPPED
+          opacity: STYLES.OPACITY
+          // dashArray: STYLES.DASH_ARRAY,
+          // dashSpeed: STYLES.DASH_SPPED
         }
       },
       pointToLayer: (geoJsonPoint, latlng) => {
@@ -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