Include scale in options
Add rectangle to example Add ellipse and rectangle to rendering tests
This commit is contained in:
@@ -8,6 +8,21 @@ import VectorLayer from '../../../src/ol/layer/Vector.js';
|
||||
import VectorSource from '../../../src/ol/source/Vector.js';
|
||||
import View from '../../../src/ol/View.js';
|
||||
|
||||
const ellipse = new Feature(new Point([-50, -50]));
|
||||
|
||||
ellipse.setStyle(
|
||||
new Style({
|
||||
image: new Circle({
|
||||
radius: 30,
|
||||
scale: [1, 0.5],
|
||||
stroke: new Stroke({
|
||||
color: '#00f',
|
||||
width: 3,
|
||||
}),
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
const vectorSource = new VectorSource();
|
||||
|
||||
vectorSource.addFeatures([
|
||||
@@ -23,6 +38,7 @@ vectorSource.addFeatures([
|
||||
geometry: new Point([50, 50]),
|
||||
radius: 30,
|
||||
}),
|
||||
ellipse,
|
||||
]);
|
||||
|
||||
const style = new Style({
|
||||
|
||||
Reference in New Issue
Block a user