From ca6c15a55e1aca6afc26885366eb7b23249b6968 Mon Sep 17 00:00:00 2001 From: chenyabin <Chenab123!> Date: 星期三, 14 四月 2021 09:46:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop --- src/components/LayerController/service/WfsLayerService.js | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js index b263e46..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, @@ -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