From f3f693a10d00b75f1eafe7f029cbd99bd3c9825b Mon Sep 17 00:00:00 2001 From: yangdelong <828900aaa> Date: 星期三, 07 四月 2021 10:24:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop --- src/components/LayerController/service/WfsLayerService.js | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js index 8d55234..7f10aee 100644 --- a/src/components/LayerController/service/WfsLayerService.js +++ b/src/components/LayerController/service/WfsLayerService.js @@ -2,7 +2,7 @@ * 鍔犺浇涓氬姟鏁版嵁鍥惧眰 */ -import styles from '../../../conf/Styles' +import { STYLES } from '../../../conf/Constants' import AjaxUtils from '../../../utils/AjaxUtils' class WfsLayerService { @@ -37,14 +37,14 @@ this.L.geoJSON(features, { style: function (feature) { return { - fill: styles.defaultLineStyle.fill, - weight: styles.defaultLineStyle.weight, - fillColor: styles.defaultLineStyle.fillColor, - color: styles.defaultLineStyle.color, - fillOpacity: styles.defaultLineStyle.fillOpacity, - opacity: styles.defaultLineStyle.opacity, - dashArray: styles.defaultLineStyle.dashArray, - dashSpeed: styles.defaultLineStyle.dashSpeed + fill: STYLES.FILL, + weight: STYLES.WEIGHT, + fillColor: STYLES.FILL_COLOR, + color: STYLES.COLOR, + fillOpacity: STYLES.FILL_OPACITY, + opacity: STYLES.OPACITY, + dashArray: STYLES.DASH_ARRAY, + dashSpeed: STYLES.DASH_SPPED } }, pointToLayer: (geoJsonPoint, latlng) => { @@ -53,7 +53,7 @@ img: { // url: 'assets/images/map/marker-icon.png', url: '/assets/images/map/' + icon, - size: styles.defaultLineStyle.size + size: STYLES.ICON_SIZE } }) }, @@ -94,13 +94,13 @@ const icon = this.config.icon const type = e.target.feature.geometry.type if (type === 'LineString' || type === 'MultiLineString') { - layer.setStyle({ weight: styles.defaultLineStyle.weight, color: styles.defaultLineStyle.color }) + layer.setStyle({ weight: STYLES.WEIGHT, color: STYLES.COLOR }) } if (type === 'Point' || type === 'MultiPoint') { layer.setStyle({ img: { url: '/assets/images/map/' + icon, - size: styles.defaultLineStyle.size + size: STYLES.ICON_SIZE } }) } -- Gitblit v1.8.0