Accept an object literal for static layer styling
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import {Circle, Fill, Style} from '../src/ol/style.js';
|
||||
import {Feature, Map, Overlay, View} from '../src/ol/index.js';
|
||||
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
|
||||
import {Point} from '../src/ol/geom.js';
|
||||
@@ -25,12 +24,10 @@ const map = new Map({
|
||||
source: new VectorSource({
|
||||
features: [new Feature(point)],
|
||||
}),
|
||||
style: new Style({
|
||||
image: new Circle({
|
||||
radius: 9,
|
||||
fill: new Fill({color: 'red'}),
|
||||
}),
|
||||
}),
|
||||
style: {
|
||||
'circle-radius': 9,
|
||||
'circle-fill-color': 'red',
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user