Skip to content

Latest commit

 

History

History
91 lines (73 loc) · 7.74 KB

v4.6.0.md

File metadata and controls

91 lines (73 loc) · 7.74 KB

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: