From 72e8ced67fe06adf794678a03d95bc1eb0947d4e Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期四, 15 四月 2021 17:34:05 +0800 Subject: [PATCH] 弹框组件初步,管线动画控制,默认值修改 --- src/components/LayerController/service/WfsLayerService.js | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js index 3aae541..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' @@ -30,14 +29,13 @@ loadData (wfsUrl) { AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => { - console.log(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, @@ -45,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) => { @@ -75,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