Files
openlayers/changelog/v4.2.0.md
2017-06-12 16:30:04 +02:00

16 KiB

4.2.0

Summary

The v4.2.0 release includes features and fixes from 87 pull requests.

New movestart event on ol.Map

The map now has a movestart event, as countarpart to the already existing moveend event.

New moveTolerance option in ol.Map

Some touch devices do not play well with OpenLayers's way of detecting clicks. To overcome this, a new moveTolerance option was introduced, so users can override the 1 pixel threshold above which a touch-release sequence won't be considered a click any more.

Support for multiple layers in ol.format.TopoJSON

With the new layerName and layers options, applications can extract the layer as additional attribute for vector features from ol.format.TopoJSON. This can especially be useful for styling vector tile layers.

New tileJSON option for ol.source.TileJSON

Like ol.source.TileUTFGrid, ol.source.TileJSON now also has a tileJSON option to configue it with inline TileJSON instead of a TileJSON URL.

New ol.format.filter.during filter

Although OpenLayers has no support for WFS v2.0, we added ol.format.filter.during for the During temporal operator.

Improved vector tile rendering at non-native resolutions

The vector tile renderer now uses an internal tile grid for all resolutions to cache pre-rendered tiles, even if the tile source does not have tiles for the viewed resolution. This improves rendering quality and performance.

New insertVertexCondition for ol.interaction.Modify

Applications can now control whether a vertex will be inserted into the modified geometry. This makes it easier to modify custom geometries.

New callback option for ol.View#fit()

To allow applications to perform custom actions when an animation associated with ol.View#fit() is completed, that method now has a new callback option.

New ol.View#getInteracting() getter

Like ol.View#getAnimating() returns true during a view animation, ol.View#getInteracting() returns true while users are interacting with the view.

New hasZ option for ol.format.WFS#writeTransaction()

When the new hasZ option is set to true, 3D coordinates will be preserved and encoded when writing a WFS transaction.

New wrapX option for ol.source.Stamen

Like other tile sources, ol.source.Stamen now also has a wrapX option, which allows applications to turn off wrapping the world in x direction.

Label support for ol.Graticule

The ol.Graticule component has several new options to add and control the output of labels. To turn on labelling, configure ol.Graticule with showLabels: true. The new options to control label formatting are lonLabelFormatter, latLabelFormatter, lonLabelPosition and latLabelPosition.

Return values of two ol.style.RegularShape getters have changed

To provide a more consistent behaviour the following getters now return the same value that was given to constructor:

ol.style.RegularShape#getPoints does not return the double amount of points anymore if a radius2 is set.

ol.style.RegularShape#getRadius2 will return undefined if no radius2 is set.

Detailed changes