Skip to content

Releases: openlayers/openlayers

v6.15.0

18 Jul 20:32
3b99134
Compare
Choose a tag to compare

Overview

The 6.15 release brings several fixes and improvements:

  • Faster vector tile rendering for soures with non-standard tile grids
  • Reduced canvas memory footprint for increased stability on iOS devices and better rendering performance
  • Fixed a bug that prevented tiles from expiring from the tile cache in the correct order
  • Better type safety with an increasing number of null checks and union types
  • New setFill and setStroke methods for RegularShape symbols
  • Vector symbol and text decluttering on the style level
  • Fixed pointer event handling on touch devices when layer visibility changes
  • New justify option for text styles
  • New Link interation for adding center, zoom, rotation and active layers to the URL
  • Easier css styling of the scale bar, and in addition to minWidth, the scale line can now also be configured with a maxWidth

Details

Deprecated 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
});

Fixed coordinate dimension handling in 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() }
);

Replacement of string enums with union types

This change only affects users that were using the non-API string enums

  • ol/OverlayPositioning
  • ol/extent/Corner
  • ol/format/FormatType
  • ol/geom/GeometryType
  • ol/source/State
  • ol/source/WMSServerType
  • ol/source/WMTSRequestEncoding

Instead of these, use the respective strings, which are now typesafe by means of union types.

List of all changes

See below for a complete list of features and fixes.

Read more

6.14.1

26 Mar 17:53
Compare
Choose a tag to compare

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.

6.14.0

26 Mar 17:39
Compare
Choose a tag to compare

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.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates

New Contributors

Full Changelog: v6.13.0...v6.14.0

v6.13.0

27 Feb 17:03
7bf014f
Compare
Choose a tag to compare

Overview

The 6.13 release brings several exciting new features and improvements:

  • A new layer.getData() method to get pixel data for a single layer (see details below).
  • Support for rich text labels in ol/style/Text, to use different font styles and fonts in a single label.
  • The 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.
  • Improvements for WebGL Tile and Points layers.
  • Performance improvements on ol/Feature, to avoid event creation when there are no listeners.
  • Update of geotiff.js to v2, to fix some build issues that users reported.
  • Improvements to the auto-generated TypeScript types.

Details

New layer.getData() method

Raster 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.

Deprecated map.forEachLayerAtPixel() method

The 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.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates
Read more

6.12.0

14 Jan 20:33
b04d542
Compare
Choose a tag to compare

The 6.12 release brings a few small fixes and enhancements. See below for a complete list.

List of all changes

Dependency Updates

New Contributors

Full Changelog: v6.11.0...v6.12.0

6.11.0

09 Jan 00:19
bd8a454
Compare
Choose a tag to compare

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.

List of all changes

Dependency Updates

New Contributors

Full Changelog: v6.10.0...v6.11.0

6.10.0

28 Dec 23:19
02c1f49
Compare
Choose a tag to compare

Just in time for the new year, the 6.10 release brings another great batch of features and fixes for your OpenLayers applications.

WebGL rendering

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:

  • A new palette operator was added that allows styling raster data based on a colormap.
  • The 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.
  • Tile layers now dispatch prerender, postrender, precompose and postcompose events with access to the WebGL rendering context.
  • Layers that are adjacent to one another now share a single canvas element and rendering context – allowing for more layers in your maps before exhausting the browser's context limit.

Vector tiles

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.

New interpolate option for sources

Sources 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.

Deprecation of the imageSmoothing option for sources

The 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
});

List of all changes

See below for more features and fixes.

Read more

v6.9.0

12 Oct 20:09
f86bad7
Compare
Choose a tag to compare

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.

Dependency Updates

v6.8.1

25 Sep 09:15
b068a33
Compare
Choose a tag to compare

This is a patch release which updates ol.css to restore a legible control button size in applications that do not have a css font-size set for button elements.

v6.8.0

24 Sep 20:11
a2d6bd3
Compare
Choose a tag to compare

The 6.8 release builds on the momentum of 6.7 with some great new enhancements. Data tiles now handle 32-bit data in addition to 8-bit. Views properties can now be provided that sources that fetch view-related data. Vector tile rendering got some performance enhancements. Find detail on these features and a number of fixes in the list of changes below.

List of all changes

Dependency Updates