Skip to content

Releases: openlayers/openlayers

v4.6.3

08 Dec 10:36
Compare
Choose a tag to compare

4.6.3

The v4.6.3 release fixes a performance issue when renderMode: 'image' is set on an ol.layer.Vector.

Fixes

  • #7554 - Only compose image vector frame when the replay group has changed (@ahocevar)

v4.6.2

07 Dec 08:14
Compare
Choose a tag to compare

4.6.2

The v4.6.2 release fixes a regression that could cause tremendous amounts of unneeded vector data to be fetched from the source.

Fixes

v4.6.1

06 Dec 21:20
Compare
Choose a tag to compare

4.6.1

The v4.6.1 release fixes a number of issues in the 4.6 releases.

Fixes

v4.6.0

06 Dec 15:25
ca3e11a
Compare
Choose a tag to compare

v4.6.0

Summary

The 4.6 release includes enhancements and fixes from 30 or so pull requests. Headlining this release, vector layers got new textBackgroundFill, textBackgroundStroke and padding options that can be used to render background boxes for text. ol.source.ImageVector is now deprecated and replaced by a more convenient way to render vectors as images: by simply setting renderMode: 'image' on the vector layer.

Please note that if you are using closure-util to build your OpenLayers based application, it is time to migrate to using the ol package and a module bundler like webpack. OpenLayers has not had a dependency on the Closure Library since the 3.19 release; and with the 5.0 release we will be moving completely away from goog.require and goog.provide, dropping support for closure-util, and going with ES modules for our sources.

See the wiki about upcoming changes in 5.0 and tips on how to upgrade. We likely won't have another 4.x release before the 5.0 release. If you're interested in continuing to get feature enhancements in future releases, migrating to the ol package now will make the transition easier.

Upgrade notes

Renamed exceedLength option of ol.style.Text to overflow

To update your applications, simply replace exceedLength with overflow.

Deprecation of ol.source.ImageVector

Rendering vector sources as image is now directly supported by ol.layer.Vector with the new renderMode: 'image' configuration option. Change code like this:

new ol.layer.Image({
  source: new ol.source.ImageVector({
    style: myStyle,
    source: new ol.source.Vector({
      url: 'my/data.json',
      format: new ol.format.GeoJSON()
    })
  })
});

to:

new ol.layer.Vector({
  renderMode: 'image',
  style: myStyle,
  source: new ol.source.Vector({
    url: 'my/data.json',
    format: new ol.format.GeoJSON()
  })
});

Detailed changes

See below for the full list of changes.

Additionally a number of updates where made to our dependencies:

v4.5.0

13 Nov 03:10
a73170c
Compare
Choose a tag to compare

Summary

The 4.5 release includes enhancements and fixes from 50 or so pull requests. Headlining this release, vector layers got a new declutter option that can be used to avoid overlapping labels. See the street labels example for a demonstration of this feature.

Please note that if you are using closure-util to build your OpenLayers based application, it is time to migrate to using the ol package and a module bundler like webpack. OpenLayers has not had a dependency on the Closure Library since the 3.19 release; and with the 5.0 release we will be moving completely away from goog.require and goog.provide, dropping support for closure-util, and going with ES modules for our sources.

We will be adding details to the wiki about upcoming changes in 5.0 and tips on how to upgrade. We'll likely have a few more 4.x releases before the 5.0 release. But if you're interested in continuing to get feature enhancements in future releases, migrating to the ol package now will make the transition easier.

Upgrade notes

Removed GeoJSON crs workaround for GeoServer

Previous version of GeoServer returned invalid crs in GeoJSON output. The workaround in ol.format.GeoJSON used to read this crs code is now removed.

Deprecation of ol.Attribution

ol.Attribution is deprecated and will be removed in the next major version. Instead, you can construct a source with a string attribution or an array of strings. For dynamic attributions, you can provide a function that gets called with the current frame state.

Before:

var source = new ol.source.XYZ({
  attributions: [
    new ol.Attribution({html: 'some attribution'})
  ]
});

After:

var source = new ol.source.XYZ({
  attributions: 'some attribution'
});

In addition to passing a string or an array of strings for the attributions option, you can also pass a function that will get called with the current frame state.

var source = new ol.source.XYZ({
  attributions: function(frameState) {
    // inspect the frame state and return attributions
    return 'some attribution'; // or ['multiple', 'attributions'] or null
  }
});

Detailed changes

See below for the full list of changes.

Read more

v4.4.2

13 Oct 23:44
Compare
Choose a tag to compare

The v4.4.2 release fixes a number of rendering issues in the 4.4 releases.

Fixes

v4.4.1

06 Oct 17:40
Compare
Choose a tag to compare

The v4.4.1 release includes a fix for the ol package and a fix for a tile rendering regression.

Fixes

v4.4.0

05 Oct 22:38
Compare
Choose a tag to compare

4.4.0

Summary

The 4.4.0 release includes features and fixes from 80 pull requests, including first time contributions from @EduardoNogueira, @ath0mas, @f7o, @trevorblades, @viethang, and @wb14123. There are some really nice rendering enhancements included in this release. It is now possible to render labels along lines (see #7239 for more detail) and polygon labels are only rendered if they fit within the polygon (#7292). In addition, we now render tiles with an opacity transition, so tiled layers more gracefully fade in (#7267).

Upgrade notes

Behavior change for polygon labels

Polygon labels are now only rendered when the label does not exceed the polygon at the label position. To get the old behavior, configure your ol.style.Text with exceedLength: true.

Minor change for custom tileLoadFunction with ol.source.VectorTile

It is no longer necessary to set the projection on the tile. Instead, the readFeatures method must be called with the tile's extent as extent option and the view's projection as featureProjection.

Before:

tile.setLoader(function() {
  var data = // ... fetch data
  var format = tile.getFormat();
  tile.setFeatures(format.readFeatures(data));
  tile.setProjection(format.readProjection(data));
  // uncomment the line below for ol.format.MVT only
  //tile.setExtent(format.getLastExtent());
});

After:

tile.setLoader(function() {
  var data = // ... fetch data
  var format = tile.getFormat();
  tile.setFeatures(format.readFeatures(data, {
    featureProjection: map.getView().getProjection(),
    // uncomment the line below for ol.format.MVT only
    //extent: tile.getExtent()
  }));
);

Deprecation of ol.DeviceOrientation

ol.DeviceOrientation is deprecated and will be removed in the next major version.
The device-orientation example has been updated to use the (gyronorm.js)[https://github.com/dorukeker/gyronorm.js] library.

Detailed changes

See below for the full list of changes.

Read more

v4.3.4

26 Sep 05:50
Compare
Choose a tag to compare

The v4.3.4 release includes a fix for Safari on iOS 11.

Fixes

  • #7285 - Convert pointerId to string for object lookups (@tschaub)

4.3.3

15 Sep 19:56
Compare
Choose a tag to compare

The v4.3.3 reverts the fractional pixel positioning of overlays.

Fixes