diff --git a/src/assets/js/map-util.js b/src/assets/js/map-util.js index 41f503d0149c59fa6f75e4c537014247602011ca..b6bf2e9ff69449f328bb36f5c4eacc64ccff748f 100644 --- a/src/assets/js/map-util.js +++ b/src/assets/js/map-util.js @@ -324,9 +324,15 @@ const mapUtil = { customFieldOption = properties[customField[0]]; } - let defaultStyle; - let hiddenStyle; + const hiddenStyle = ({ + radius: 0, + fillOpacity: 0.5, + weight: 0, + fill: false, + color: featureType.color, + }); + let defaultStyle; if ( featureType.colors_style.value.icons[customFieldOption] && featureType.colors_style.value.icons[customFieldOption] !== 'circle' @@ -347,10 +353,6 @@ const mapUtil = { icon: customMapIcon }; - hiddenStyle = ({ - icon: customMapIcon - }); - } else { defaultStyle = { @@ -360,15 +362,7 @@ const mapUtil = { fill: true, color: color, }; - - hiddenStyle = ({ - radius: 0, - fillOpacity: 0.5, - weight: 0, - fill: false, - color: featureType.color, - }); - + } // Filtre sur le feature type