Update box selection example

This commit is contained in:
Tim Schaub
2022-01-01 09:37:40 -07:00
parent 539eae1398
commit faddbf098b
4 changed files with 39 additions and 19 deletions

View File

@@ -17,12 +17,8 @@ const vectorLayer = new VectorLayer({
format: new GeoJSON(),
}),
style: function (feature) {
const color = feature.get('COLOR');
if (color) {
style.getFill().setColor(color);
} else {
style.getFill().setColor('#eeeeee');
}
const color = feature.get('COLOR') || '#eeeeee';
style.getFill().setColor(color);
return style;
},
});