Reset style GeoJSON preview example
This commit is contained in:
parent
f60a97b8f8
commit
9c143649a2
|
@ -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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue