From a2cf1dafa47139ef92135376db24ece72d2b51d2 Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期一, 17 五月 2021 17:19:41 +0800 Subject: [PATCH] 管线分析 --- 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