Skip to content

Releases: openlayers/openlayers

v10.4.0

29 Jan 19:26
85219a8
Compare
Choose a tag to compare

With more than 40 pull requests, the 10.4 release brings performance improvements, bug fixes, better TypeScript generics and new features. New features include a convenience Image layer loader for debugging MapServer map files using the MapServer CGI API, and an experimental WebGLVectorTile layer.

Upgrade notes

Deprecation of ol/layer/WebGLPoints

Use ol/layer/WebGLVector instead. Besides rendering points it will also render lines and polygons.
In most cases this is a drop-in replacement. To use filtering the style and filter have to be in a nested object.

// Before
new WebGLPointsLayer({
  filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
  style: {
    'circle-radius': 8,
    'circle-fill-color': 'blue',
  },
  source: vectorSource,
})

// After
new WebGLVectorLayer({
  style: [{
    filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
    style: {
      'circle-radius': 8,
      'circle-fill-color': 'blue',
    },
  }],
  source: vectorSource,
})

ol/style/webgl module removal

WebGL renderers used to rely on the WebGLStyle type in the ol/style/webgl module. This is not the case anymore, all renderers now rely on FlatStyle from ol/style/flat.

-import type { WebGLStyle } from 'ol/style/webgl';
+import type { FlatStyle } from 'ol/style/flat';

ol-mapbox-style compatibility

This version of OpenLayers is only compatible with ol-mapbox-style@12.4.0 or higher.

Returning false from a one-time listener added with once

Returning false from the listener function will now stop propagation, when the listener is added with once.
Previously this only worked with the on method.

The filter option for WebGLPointsLayer has changed

The filter option for the WebGLPointsLayer must now be specified alongside other options instead of being part of the style object. Note that the WebGLPointsLayer is not part of the stable API and is subject to breaking changes between major releases.

// Before
new WebGLPointsLayer({
  style: {
    filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
    'circle-radius': 8,
    'circle-fill-color': 'blue',
  },
  source: vectorSource,
})

// Now
new WebGLPointsLayer({
  filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
  style: {
    'circle-radius': 8,
    'circle-fill-color': 'blue',
  },
  source: vectorSource,
})

Get ready for future changes

We're planning to stop providing barrel files, which will impact how you import modules from OpenLayers. See #16461 for details. To get your code ready for that upcoming change, you can already help us test the replace-barrel-imports codemod from the @openlayers/codemod package.

List of all changes

Read more

v10.3.1

06 Dec 15:34
Compare
Choose a tag to compare

The 10.3.1 patch release contains several fixes and improvements to types, adds a missing class export and fixes a couple of broken WebGL points examples.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates

Full Changelog: v10.3.0...v10.3.1

v10.3.0

30 Nov 11:30
e5d6336
Compare
Choose a tag to compare

In addition to many important bug fixes, the 10.3 release adds several improvements to the recently introduced ImageTile source, support for model transformations for the GeoTIFF source, a new SentinelHub source, built-in support for UTM coordinate transforms, smart caching of regular shape and icon styles, TypeScript improvements for the VectorImage layer, and a new WebGLVectorLayer.

Upgrade notes

The transform function throws for unknown projections

Previously, the transform() function from the ol/proj module would apply the identity transform if either the source or the destination projections were unrecognized. Now this function will throw an error if it cannot perform the transform. You can check whether a projection is registered by calling the get() function from ol/proj - this function returns null if the projection definition for a provided identifier is not known.

The format of the style for WebGLPointsLayer has changed

Such a layer would previously be created this way:

// Before
new WebGLPointsLayer({
  style: {
    // variables were part of the `style` object
    variables: {
      minYear: 1850,
      maxYear: 2015,
    },
    filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
  },
  source: vectorSource,
})

From this release on, variables are now set as a separate object at the root of the options object:

// Now
new WebGLPointsLayer({
  style: {
    filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
  },
  variables: {
    minYear: 1850,
    maxYear: 2015,
  },
  source: vectorSource,
})

List of all changes

See below for a complete list of features and fixes.

Dependency Updates
Read more

v10.2.1

26 Sep 20:27
f274df2
Compare
Choose a tag to compare

The 10.2.1 patch release fixes an issue with missing tiles on reprojected tile layers. See the 10.2.0 release notes for a complete list of changes since the previous release.

What's Changed

New Contributors

Full Changelog: v10.2.0...v10.2.1

v10.2.0

23 Sep 08:23
a70874d
Compare
Choose a tag to compare

The 10.2 release adds an experimental Flow layer to render particle flows (e.g. wind) in WebGL, support for WMS Capabilities v1.1.1, and an ol.VERSION property in the legacy build. Under the hood, it brings several performance improvements, better memory management, bug fixes, type improvements, and the removal of unnecessary tile caching code.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates

New Contributors

Full Changelog: v10.1.0...v10.2.0

v10.1.0

22 Aug 02:50
Compare
Choose a tag to compare

Thanks to those who contributed to the 10.1 release! See below for a complete list of new features and fixes.

πŸŽ‚ features

🐜 fixes

🚬 dependencies

πŸ† new contributors

πŸ“œ full changelog v10.0.0...v10.1.0

v10.0.0

27 Jul 10:27
6734ed6
Compare
Choose a tag to compare

10.0.0

The 10.0 release brings several significant improvements, including a new base source for image tile sources with improved performance and simplified code. Flat styles handling has been reworked, removing the need to specify type hints among other internal improvements. In the WebGL renderer, a memory allocation issue has been fixed. For better developer experience, we improved generic types and fixed some issues with types, stabilizing the back and forth on generics in v9.x.

Breaking changes are very minor, so we recommend upgrading to v10.x for all v9.x users.

Backwards incompatible changes

ol/source/VectorTile: getFeaturesInExtent() method moved to ol/layer/VectorTile

The getFeaturesInExtent() method of ol/source/VectorTile has been moved to ol/layer/VectorTile. The signature and behavior have not changed, so all that needs to be done is change code from e.g.

layer.getSource().getFeaturesInExtent(extent);

to

layer.getFeaturesInExtent(extent);
Flat styles: Removal of Type hints in 'get' expressions

For the Canvas renderer, additional arguments to the 'get' call expression now mean access to nested properties or array items. The expression system has been improved so type hints are no longer needed. If you were previously using a type hint in a get expression, you have to change the expression from e.g.

['get', 'foo', 'number[]']

to

['get', 'foo']

Other changes

Removal of the opaque option from all Tile sources

The opaque option was previously used to hint the renderer to perform some optimizations on layers known to be fully opaque. This is no longer needed, and the option has been removed.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates
Read more

v9.2.4

27 May 17:59
Compare
Choose a tag to compare

The 9.2.4 is a patch release that addresses the issue below.

  • Fix case expression with numeric size types (by @M393 in #15876)

v9.2.3

22 May 23:45
Compare
Choose a tag to compare

The 9.2.3 is a patch release that addresses the issue below.

v9.2.2

18 May 19:39
Compare
Choose a tag to compare

The 9.2.2 is a patch release that addresses the issues below.

List of all changes