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