Skip to content

Releases: openlayers/openlayers

v7.2.2

22 Dec 08:47
6d07af1
Compare
Choose a tag to compare

The 7.2.2 release adds back missing symbols to the full build. See the changelog for 7.2.0 for new features and fixes since 7.1.

What's Changed

Full Changelog: v7.2.1...v7.2.2

v7.2.1

22 Dec 08:47
7631ef8
Compare
Choose a tag to compare

The 7.2.1 release is a patch to provide a working full build. See the changelog for 7.2.0 for new features and fixes since 7.1.

What's Changed

Full Changelog: v7.2.0...v7.2.1

v7.2.0

21 Dec 15:10
Compare
Choose a tag to compare

The 7.2 release includes …

  • …some new features (e.g. for icon styling),
  • …performance optimisations (e.g. for canvas rendering),
  • …better interoperability (e.g. OGC API - Tiles support, saner projection-handling for GeoTIFFs and a new PMTiles example),
  • …the usual smaller bugfixes, and
  • …a lot of dependency updates.

Please find below four aspects of this release that we want to highlight and make
sure to scan over the full list of included changes (even further below).

OGC vector and map tile sources are now a stable part of the API

The OGC API – Tiles core v1 spec has been published, and as a consequence we marked the long existing vector and map tile sources as part of the stable API.

Introduce width and height configuration options to Icon styles

It is now possible to create an icon symbolizer with an explicit width and/or height, e.g.:

const myIcon = new Icon({
  src: 'data/icon.png',
  width: 32,
  height: 32
});

This is an additional configuration option to make working with image icons easier.

Rendered resolutions of ol/source/Raster

Previously, ol/source/Raster processed input sources at the current view resolution, which caused interpolation artefacts in cases where input sources were up- or downsampled. Now, ol/source/Raster picks up the resolutions from the first input source that has resolutions configured (either implicitly through a tile grid in the case of tile sources, or directly when configured through the resolutions constructor option). This improves the rendered output in most cases.

If the previous behavior is desired, configure the source with resolutions: null.

Fixed wrapX behavior of ol/control/MousePosition

Previously, ol/control/MousePosition always displayed coordinates as-is. Now it has a wrapX option,
which is true by default. This avoids longitudes aoutside the -180 to 180 degrees range.

If you want the previous behavior, which displays coordinates with longitudes less than -180 or greater than 180, configure the control with wrapX: false.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates
Read more

v7.1.0

31 Aug 20:37
Compare
Choose a tag to compare

The 7.1 release adds a handful of new features and updates the story for users of the full library build.

Draw with tracing

The draw interaction has a new trace option. When this is set, you can click on existing features to trace their outlines while creating new polygons or lines.

New GeoTIFF options

The GeoTIFF source now supports imagery with internal masks. In addition, the GeoTIFF source accepts a convertToRGB: 'auto' setting. With this new setting, the values will be converted to RGB in cases where the input data has three bands and the photometric interpretation is one of CMYK, YCbCr, CIELab, or ICCLab.

Notice to full build users

If you have been using the full build of the library, we now include this full build in the release package. This should mean stable URLs that you can point to in a <script> tag. See the https://openlayers.org/download/ page for more detail.

Deprecation of ol/AssertionError and error codes

Future versions will no longer throw ol/AssertionError with an error code. Instead, they will throw Error with just the error message.

Updating parameters in ol/source/ImageWMS and ol/source/TileWMS

The updateParams() method is the only way to update WMS parameters. Changes made directly to the params object passed as a constructor option will have no effect.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates

New Contributors

Full Changelog: v7.0.0...v7.1.0

v7.0.0

19 Aug 04:34
Compare
Choose a tag to compare

The 7.0 release includes an impressive batch of features and fixes from over 90 pull requests. We're excited about a new foundation for WebGL vector rendering. The previous point rendering functionality has been extended to include lines and polygons. The rendering API is still low level and experimental. Future releases will include a higher level styling API.

In developing the new WebGL rendering functionality, we changed the signature for a number of methods on a helper class that had been marked as part of the API in 6.x releases. While this is technically a breaking change, it is unlikely that applications were using this helper class, so upgrades should be straightforward.

We took advantage of the breaking change in the WebGL helper class to remove a few other deprecated parts of the API. In addition, since Microsoft ended support for Internet Explorer a few months ago, we decided to do the same.

Backwards incompatible changes

Removal of deprecated properties and methods

  • The tilePixelRatio has been removed from the DataTile source.
  • The imageSmoothing option has been removed from sources.
  • The undefinedHTML option has been removed from the MousePosition control.
  • The forEachLayerAtPixel method has been removed from the Map class.
  • Deprecated options have been removed from the Overlay component.
  • The labelCache has been removed from the ol/render/canvas.js module.

Internet Explorer is no longer supported

Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.

ol/webgl/Helper.js

The Helper constructor from the ol/webgl/Helper.js module is no longer part of the public API.

ol/coordinate.js

The toStringHDMS function from the ol/coordinate.js module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.

ol/layer/Graticule

The default intervals now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom intervals suited to that format.

ol/Collection

Inserting with setAt or insertAt beyond the current length used to create a sparse Collection with undefined inserted for any missing indexes. This will now throw an error instead.

ol/control/MousePosition

The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With placeholder: '&#160;' you can keep the old behaviour. The placeholder option no longer accepts false as a valid value, instead simply omit the option. The undefinedHTML option has been removed. You should use placeholder instead.

ol/PluggableMap

The PluggableMap class has been removed. If you want to create a custom map class, extend the Map class instead.

ol/style/Icon and ol/style/RegularShape

ol/style/Image and subclasses displacement is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.

List of all changes

See below for a complete list of features and fixes.

Read more

v6.15.1

18 Jul 21:26
9613cb9
Compare
Choose a tag to compare

The 6.15.1 release is a patch to ensure that a layer gets rendered when its source has completed loading. See the changelog for 6.15.0 for new features and fixes since 6.14.

List of all changes:

  • Recover from incorrect rebase after removal of string enums (in #13835 by @ahocevar)

Full Changelog: v6.15.0...v6.15.1

v6.15.0

18 Jul 20:32
3b99134
Compare
Choose a tag to compare

Overview

The 6.15 release brings several fixes and improvements:

  • Faster vector tile rendering for soures with non-standard tile grids
  • Reduced canvas memory footprint for increased stability on iOS devices and better rendering performance
  • Fixed a bug that prevented tiles from expiring from the tile cache in the correct order
  • Better type safety with an increasing number of null checks and union types
  • New setFill and setStroke methods for RegularShape symbols
  • Vector symbol and text decluttering on the style level
  • Fixed pointer event handling on touch devices when layer visibility changes
  • New justify option for text styles
  • New Link interation for adding center, zoom, rotation and active layers to the URL
  • Easier css styling of the scale bar, and in addition to minWidth, the scale line can now also be configured with a maxWidth

Details

Deprecated tilePixelRatio option for data tile sources.

If you were previously trying to scale data tiles using the tilePixelRatio property for data tile sources (this is rare), you should now use the explicit tileSize and tileGrid properties. The source's tileSize represents the source tile dimensions and the tile grid's tileSize represents the desired rendered dimensions.

const source = new DataTileSource({
  tileSize: [512, 512], // source tile size
  tileGrid: createXYZ({tileSize: [256, 256]}), // rendered tile size
});

Fixed coordinate dimension handling in ol/proj's addCoordinateTransforms

The forward and inverse functions passed to addCooordinateTransforms now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like

addCoordinateTransforms(
    'EPSG:4326',
    new Projection({code: 'latlong', units: 'degrees'}),
    function(coordinate) { return coordinate.reverse(); },
    function(coordinate) { return coordinate.reverse(); }
);

you have to change that to

addCoordinateTransforms(
    'EPSG:4326',
    new Projection({code: 'latlong', units: 'degrees'}),
    function(coordinate) { return coordinate.slice(0, 2).reverse() },
    function(coordinate) { return coordinate.slice(0, 2).reverse() }
);

Replacement of string enums with union types

This change only affects users that were using the non-API string enums

  • ol/OverlayPositioning
  • ol/extent/Corner
  • ol/format/FormatType
  • ol/geom/GeometryType
  • ol/source/State
  • ol/source/WMSServerType
  • ol/source/WMTSRequestEncoding

Instead of these, use the respective strings, which are now typesafe by means of union types.

List of all changes

See below for a complete list of features and fixes.

Read more

6.14.1

26 Mar 17:53
Compare
Choose a tag to compare

The 6.14.1 release is a patch to correct a version discrepancy in the package-lock.json file. See the changelog for 6.14.0 for new features and fixes since 6.13.

6.14.0

26 Mar 17:39
Compare
Choose a tag to compare

The 6.14 release includes a few new features and fixes. The new loadstart and loadend events make it easy to add loading indicators to your maps. Enhancements to the snap interaction add support for snapping to points coincident with lines and improve performance. A change to WebGL rendering works around an issue in Safari 15.4. Find detail on these improvements and more in the full list of changes below.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates

New Contributors

Full Changelog: v6.13.0...v6.14.0

v6.13.0

27 Feb 17:03
7bf014f
Compare
Choose a tag to compare

Overview

The 6.13 release brings several exciting new features and improvements:

  • A new layer.getData() method to get pixel data for a single layer (see details below).
  • Support for rich text labels in ol/style/Text, to use different font styles and fonts in a single label.
  • The useGeograpic() and setUserProjection() functions in the ol/proj module are now part of the official API. These functions make it easier to work with geographic coordinates or local projections.
  • Improvements for WebGL Tile and Points layers.
  • Performance improvements on ol/Feature, to avoid event creation when there are no listeners.
  • Update of geotiff.js to v2, to fix some build issues that users reported.
  • Improvements to the auto-generated TypeScript types.

Details

New layer.getData() method

Raster layers (static images, image tiles, data tiles) have a new layer.getData(pixel) method that returns the pixel data at the provided location. The return value depends on the underlying source data type. For example, a GeoTIFF may return a Float32Array with one value per band, while a PNG rendered from a tile layer will return a Uint8ClampedArray of RGBA values.

If you were previously using the map.forEachLayerAtPixel() method, you should use the new layer.getData() method instead. The old method returns composite pixel values from multiple layers and is limited to RGBA values. The new method doesn't suffer from these shortcomings and is more performant.

Deprecated map.forEachLayerAtPixel() method

The map.forEachLayerAtPixel() method has been deprecated. It will be removed (or its behavior may change) in the next major release. Please use the layer.getData() method instead.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates
Read more