Include scale in options

Add rectangle to example
Add ellipse and rectangle to rendering tests
This commit is contained in:
mike-000
2020-08-08 17:06:13 +01:00
parent 25f8b4d8d7
commit 722e0c5b69
8 changed files with 70 additions and 6 deletions

View File

@@ -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({