OpenLayers
The 6.15.1 release is a patch to ensure that a layer gets rendered when its source has completed loading. See the changelog for 6.15.0 for new features and fixes since 6.14.
Full Changelog: https://github.com/openlayers/openlayers/compare/v6.15.0...v6.15.1
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 maxWidth
tilePixelRatio
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 addCoordinateTransforms
The 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 string
s, 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)Full Changelog: https://github.com/openlayers/openlayers/compare/v6.14.1...v6.15.0
The 6.14.1 release is a patch to correct a version discrepancy in the package-lock.json
file. See the changelog for 6.14.0 for new features and fixes since 6.13.
The 6.14 release includes a few new features and fixes. The new loadstart
and loadend
events make it easy to add loading indicators to your maps. Enhancements to the snap interaction add support for snapping to points coincident with lines and improve performance. A change to WebGL rendering works around an issue in Safari 15.4. Find detail on these improvements and more in the full list of changes below.
See below for a complete list of features and fixes.
OES_texture_float_linear
is not supported (by @mike-000 in https://github.com/openlayers/openlayers/pull/13505)Full Changelog: https://github.com/openlayers/openlayers/compare/v6.13.0...v6.14.0
The 6.13 release brings several exciting new features and improvements:
layer.getData()
method to get pixel data for a single layer (see details below).ol/style/Text
, to use different font styles and fonts in a single label.useGeograpic()
and setUserProjection()
functions in the ol/proj
module are now part of the official API. These functions make it easier to work with geographic coordinates or local projections.ol/Feature
, to avoid event creation when there are no listeners.layer.getData()
methodRaster layers (static images, image tiles, data tiles) have a new layer.getData(pixel)
method that returns the pixel data at the provided location. The return value depends on the underlying source data type. For example, a GeoTIFF may return a Float32Array
with one value per band, while a PNG rendered from a tile layer will return a Uint8ClampedArray
of RGBA values.
If you were previously using the map.forEachLayerAtPixel()
method, you should use the new layer.getData()
method instead. The old method returns composite pixel values from multiple layers and is limited to RGBA values. The new method doesn't suffer from these shortcomings and is more performant.
map.forEachLayerAtPixel()
methodThe map.forEachLayerAtPixel()
method has been deprecated. It will be removed (or its behavior may change) in the next major release. Please use the layer.getData()
method instead.
See below for a complete list of features and fixes.
"skipLibCheck": false
(by @seravifer in https://github.com/openlayers/openlayers/pull/13382)ol/source/Cluster#setSource
type annotation (by @MoonE in https://github.com/openlayers/openlayers/pull/12998)@type
annotation by jsdoc (by @MoonE in https://github.com/openlayers/openlayers/pull/13350)src=""
(by @mike-000 in https://github.com/openlayers/openlayers/pull/13271)Full Changelog: https://github.com/openlayers/openlayers/compare/v6.12.0...v6.13.0
The 6.12 release brings a few small fixes and enhancements. See below for a complete list.
Full Changelog: https://github.com/openlayers/openlayers/compare/v6.11.0...v6.12.0
This release follows up on the 6.10 release with a fix for Mapbox vector layers rendered over other layers. A handful of other fixes and features are included. See below for more detail.
attributions
and attributionsCollapsible
options to ol/source/DataTile
(by @mike-000 in https://github.com/openlayers/openlayers/pull/13176)Full Changelog: https://github.com/openlayers/openlayers/compare/v6.10.0...v6.11.0
Just in time for the new year, the 6.10 release brings another great batch of features and fixes for your OpenLayers applications.
You can now update the style for your WebGL tile layers with layer.setStyle()
. Keep in mind that it is more efficient to use style variables if you want to adjust styling on every render frame. However, in cases where you want to completely reconfigure the style, you can use the new layer.setStyle()
method.
Additional WebGL tile layer rendering enhancements:
palette
operator was added that allows styling raster data based on a colormap.band
operator accepts expressions for the band number (in addition to numeric literals) – allowing for bands to be set by user provided style variables, for example.prerender
, postrender
, precompose
and postcompose
events with access to the WebGL rendering context.The Mapbox vector layer now works more easily with other vector tile providers. In addition, vector tile layers can now be configured with a background color.
interpolate
option for sourcesSources now have an interpolate
option. This option controls whether data from the source is interpolated when resampling.
For ol/source/DataTile
sources, the default is interpolate: false
. This means that when a data tile source is used with a WebGL tile layer renderer, your style expression will have access to pixel values in the data tiles without interpolation. If this option is set to true, linear interpolation will be used when over- or under-sampling the data.
imageSmoothing
option for sourcesThe imageSmoothing
option for sources has been deprecated and will be removed in the next major release. Use the interpolate
option instead.
// if you were using `imageSmoothing`
const before = new TileSource({
imageSmoothing: false
});
// use the `interpolate` option instead
const after = new TileSource({
interpolate: false
});
See below for more features and fixes.
The 6.9 release brings a few new features and a number of fixes. GeoTIFF sources now have a normalize
option. Set normalize: false
if you want your style expressions to work with raw floating point values instead of normalized values from 0 to 1. The GeoTIFF source also now uses nodata values from the source imagery – so in most cases you don't need to specify this yourself. For people configuring vector layers with styles that use custom rendering, you can now get hit detection on the rendered result. See details on these features and other included fixes below.
layers
option in OverviewMap
(@ejn)