allow scale to be two dimensional

add getScaleArray() method

test two dimension scale icons
test two dimension scale text

add example of icon and label scaling
use smaller icon and larger interval
test two dimensional scale icons
test two dimensional scale icons
This commit is contained in:
mike-000
2020-05-13 12:18:51 +01:00
parent 6802fb7e34
commit cf0e650435
19 changed files with 528 additions and 111 deletions

View File

@@ -110,15 +110,23 @@ feature.setStyle(
);
vectorSource.addFeature(feature);
// background and padding
// two dimensional scale
feature = new Feature({
geometry: new Point([-10, 0]),
geometry: new Point([100, 20]),
});
feature.setStyle(
new Style({
text: new Text({
text: 'hello',
text: 'mirror',
font: '12px Ubuntu',
scale: [-1, 2],
rotateWithView: true,
fill: new Fill({
color: 'red',
}),
stroke: new Stroke({
color: '#000',
}),
padding: [1, 2, 3, 5],
backgroundFill: new Fill({
color: 'rgba(55, 55, 55, 0.25)',