Reset style GeoJSON preview example

This commit is contained in:
wpetit 2021-01-25 10:29:56 +01:00
parent f60a97b8f8
commit 9c143649a2
1 changed files with 5 additions and 5 deletions

View File

@ -116,10 +116,10 @@
geojsonLayer = L.geoJSON(geojson, { geojsonLayer = L.geoJSON(geojson, {
style: feature => { style: feature => {
return { return {
color: feature.properties.color, color: feature.properties.landxmlColor,
fillColor: feature.properties.fill, fillColor: feature.properties.landxmlColor,
fillOpacity: feature.properties['fill-opacity'], fillOpacity: 0.5,
weight: feature.properties['stroke-width'], weight: 1,
} }
}, },
onEachFeature: (f, l) => { onEachFeature: (f, l) => {
@ -141,7 +141,7 @@
if(feature.geometry.type !== 'Point') { if(feature.geometry.type !== 'Point') {
// Style selected // Style selected
selectedFeature.setStyle({ selectedFeature.setStyle({
'fillColor': 'blue' 'fillOpacity': 0.9
}) })
} }