From c065531c87e7dc199c7fc4d35e4f6fbedf26167d Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期三, 19 五月 2021 15:40:37 +0800
Subject: [PATCH] 定位、弹窗信息、排口查询BUG修复

---
 src/components/LayerController/logic/PipeLineAnimal.js |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/components/LayerController/logic/PipeLineAnimal.js b/src/components/LayerController/logic/PipeLineAnimal.js
index e9cabbe..11c54ef 100644
--- a/src/components/LayerController/logic/PipeLineAnimal.js
+++ b/src/components/LayerController/logic/PipeLineAnimal.js
@@ -7,6 +7,9 @@
 
 module.exports = function () {
   this.init = () => {
+  }
+
+  this.start = () => {
     const layers = LayerPipeLines.layers
     for (var i = 0; i < layers.length; i++) {
       const config = layers[i]
@@ -42,12 +45,22 @@
     for (var i = 0; i < layers.length; i++) {
       const config = layers[i]
       const code = config.code
+      const styles = config.styles
       // window.layerFactory.show(config)
       const layer = window.layerFactory.layers[code]
       if (layer) {
         if (layer.eachLayer) {
           layer.eachLayer(function (layer) {
             layer.resetStyle()
+            var newStyles = Object.assign(STYLES, styles)
+            layer.setStyle({
+              fill: newStyles.FILL,
+              weight: newStyles.WEIGHT,
+              fillColor: newStyles.FILL_COLOR,
+              color: newStyles.COLOR,
+              fillOpacity: newStyles.FILL_OPACITY,
+              opacity: newStyles.OPACITY
+            })
           })
         }
       }

--
Gitblit v1.8.0