From dc1884bc0afc8c4547a056c7ff0b9e78467b5dfc Mon Sep 17 00:00:00 2001
From: ChenZeping <chenzeping>
Date: 星期四, 29 四月 2021 17:54:30 +0800
Subject: [PATCH] 管线分析

---
 src/components/LayerController/service/WfsLayerService.js |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js
index 0c601a2..5bc5a9f 100644
--- a/src/components/LayerController/service/WfsLayerService.js
+++ b/src/components/LayerController/service/WfsLayerService.js
@@ -1,5 +1,5 @@
 /**
- * 鍔犺浇涓氬姟鏁版嵁鍥惧眰
+ * 鍔犺浇wfs鏈嶅姟鍥惧眰
  */
 import { STYLES } from '../../../conf/Constants'
 import AjaxUtils from '../../../utils/AjaxUtils'
@@ -73,7 +73,11 @@
             closeButton: false,
             autoClose: false
           })
-            .bindTooltip((layer) => this.tooltipListener(layer), { direction: 'bottom', offset: [0, 15], sticky: true })
+          layer.bindTooltip((layer) => this.tooltipListener(layer), {
+            direction: 'bottom',
+            offset: [0, 15],
+            sticky: true
+          })
             .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer))
         }
       }).addTo(this.layer)
@@ -85,7 +89,10 @@
     const icon = this.config.icon
     const type = e.target.feature.geometry.type
     if (type === 'LineString' || type === 'MultiLineString') {
-      layer.setStyle({ weight: 8, color: '#00ffff' })
+      layer.setStyle({
+        weight: 8,
+        color: '#00ffff'
+      })
     } else if (type === 'Point' || type === 'MultiPoint') {
       layer.setStyle({
         img: {
@@ -101,7 +108,10 @@
     const icon = this.config.icon
     const type = e.target.feature.geometry.type
     if (type === 'LineString' || type === 'MultiLineString') {
-      layer.setStyle({ weight: STYLES.WEIGHT, color: STYLES.COLOR })
+      layer.setStyle({
+        weight: STYLES.WEIGHT,
+        color: STYLES.COLOR
+      })
     }
     if (type === 'Point' || type === 'MultiPoint') {
       layer.setStyle({
@@ -127,4 +137,5 @@
     return name
   }
 }
+
 export default WfsLayerService

--
Gitblit v1.8.0