Skip to content

v4.4.0

Compare
Choose a tag to compare
@tschaub tschaub released this 05 Oct 22:38

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.

Additionally a number of updates where made to our dependencies: