changelog/v6.13.0.md
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)