From d0391dba3708d3f32bcd94e1881d1b598a0d9ef0 Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期四, 15 四月 2021 17:21:10 +0800
Subject: [PATCH] 修改图表问题

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

diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js
index 7f10aee..f00eaeb 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'
 
@@ -29,12 +28,14 @@
   }
 
   loadData (wfsUrl) {
-    AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => this.draw(res.data.features))
+    AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => {
+      this.draw(res.data.features)
+    })
   }
 
   draw (features) {
     const icon = this.config.icon
-    this.L.geoJSON(features, {
+    const geojsonLayer = this.L.geoJSON(features, {
       style: function (feature) {
         return {
           fill: STYLES.FILL,
@@ -42,9 +43,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) => {
@@ -72,6 +73,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