From 4f210560973162685449e99ece819a1aad190db1 Mon Sep 17 00:00:00 2001
From: seatonwan9 <seatonwan9@163.com>
Date: 星期二, 20 四月 2021 14:12:16 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 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..8726b4a 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.create = () => {
     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