changelog/v6.15.0.md
The 6.15 release brings several fixes and improvements:
null checks and union typessetFill and setStroke methods for RegularShape symbolsjustify option for text stylesLink interation for adding center, zoom, rotation and active layers to the URLminWidth, the scale line can now also be configured with a maxWidthtilePixelRatio option for data tile sources.If you were previously trying to scale data tiles using the tilePixelRatio property for data tile sources (this is rare), you should now use the explicit tileSize and tileGrid properties. The source's tileSize represents the source tile dimensions and the tile grid's tileSize represents the desired rendered dimensions.
const source = new DataTileSource({
tileSize: [512, 512], // source tile size
tileGrid: createXYZ({tileSize: [256, 256]}), // rendered tile size
});
ol/proj's addCoordinateTransformsThe forward and inverse functions passed to addCooordinateTransforms now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.reverse(); },
function(coordinate) { return coordinate.reverse(); }
);
you have to change that to
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.slice(0, 2).reverse() },
function(coordinate) { return coordinate.slice(0, 2).reverse() }
);
This change only affects users that were using the non-API string enums
Instead of these, use the respective strings, which are now typesafe by means of union types.
See below for a complete list of features and fixes.
justify option for text style (by @rycgar in https://github.com/openlayers/openlayers/pull/13571)