Skip to content

v10.11.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Oct 19:55
· 4 commits to main since this release
88fc445

10.11.0

The 10.11 release improves styling, raster data and OGC service support, and makes the library leaner to load. The highlights are

  • Canvas styles now evaluate the color and array operators, and interpolate mixes colors in sRGB on both the Canvas and WebGL renderers; a new interpolate-hcl operator keeps the perceptual gradient
  • ol/source/Raster gains basic data tile support, and the GeoZarr source can visualize generic n-D datacubes and accepts storeOptions for headers and credentials
  • WMTS sources no longer derive their extent from the tile matrices, so layers that cover a wider area at low zoom levels are no longer cut off
  • Tiles that the current view no longer needs are dropped from the queue, and the WebGL text overlay worker is loaded on demand
  • The VectorImageLayer gets crisp rendering on rotated views, with rotated text and point symbols
  • New wrapX option for getPixelFromCoordinate and getCoordinateFromPixel, and projection options for the WKT format
  • Fixes for RTL text along lines, nested WFS 2.0 feature collections, empty GeoJSON coordinate arrays, and MouseWheelZoom target cleanup

Upgrade notes

Fixed GeoJSON parsing of geometries with empty coordinate arrays

Previously, a GeoJSON geometry with an empty coordinates array (e.g. {"type": "Point", "coordinates": []}) produced a geometry with an empty coordinates array. We have now changed this to match the GeoJSON spec's recommendation to treat such geometries (except GeometryCollection) as null geometries. This change should not affect application code, unless it had special handling for geometries with empty coordinates arrays.

Fixed: interpolate mixed colors differently on the Canvas and WebGL renderers

The ['interpolate', ...] operator interpolated colors in the Hue-Chroma-Luminance space on
the Canvas renderer, but component-wise in sRGB on the WebGL renderer. The same style
produced different gradients depending on which renderer drew it, and neither behaviour was
documented. Both now interpolate in sRGB.

Gradients built with interpolate over colors will look slightly different on the Canvas
renderer. To keep the previous appearance, use the new interpolate-hcl operator:

// Before
const style = {
  'fill-color': ['interpolate', ['linear'], ['get', 'value'], 0, 'red', 1, 'green'],
};
// After - to keep the perceptual gradient
const style = {
  'fill-color': ['interpolate-hcl', ['linear'], ['get', 'value'], 0, 'red', 1, 'green'],
};

interpolate-hcl is only supported by the Canvas renderer for now.

With the ['interpolate', ...] operator, channels now keep their fractional part, so operations
applied on top of an interpolated color are more accurate. Code reading back a color from an
evaluated style may now see a fractional channel.

The WMTS tile grid extent is no longer calculated from the tile matrices

optionsFromCapabilities now only uses an advertised BoundingBox as the tile grid's
extent, and tileGrid.getExtent() returns null when none is advertised. Tile requests
are limited by the advertised tile matrix sizes and TileMatrixSetLimits instead, so
layers that cover a wider area at low zoom levels than at high ones are no longer cut off.

wrapX from optionsFromCapabilities is based on the tile matrix

The world is now wrapped when the first tile matrix spans exactly the width of the
projection's extent, instead of when the layer's WGS84BoundingBox covers the whole world.
Sources that cover only part of the world on a world spanning tile matrix set - e.g. a
national basemap on GoogleMapsCompatible - are now configured with the wrapX option set
to true. If that's undesired, wrapX needs to be overridden to false.

// Before
new WMTS(optionsFromCapabilities(capabilities, {layer: 'my-layer'}));
// After - to keep the layer in a single world copy
new WMTS({
  ...optionsFromCapabilities(capabilities, {layer: 'my-layer'}),
  wrapX: false,
});

The Layer's WGS84BoundingBox is no longer used, because the WMTS specification allows
it to be approximate.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates
  • chore(deps-dev): bump the development-security group across 1 directory with 3 updates (by @openlayers in #17653)
  • chore(deps): bump earcut from 3.2.3 to 3.2.4 in the production-minor-patch group (by @openlayers in #17655)
  • chore(deps): bump the actions group across 1 directory with 2 updates (by @openlayers in #17656)
  • chore(deps): bump github/codeql-action from 4.37.9 to 4.38.0 in the actions group (by @openlayers in #17642)
  • chore(deps): bump the actions group across 1 directory with 2 updates (by @openlayers in #17613)
  • chore(deps): bump zarrita from 0.7.4 to 0.7.5 in the production-minor-patch group (by @openlayers in #17632)
  • chore(deps): bump the actions group across 1 directory with 2 updates (by @openlayers in #17609)
  • chore(deps-dev): bump the development-security group across 1 directory with 2 updates (by @openlayers in #17597)
  • chore(deps): bump zarrita from 0.7.3 to 0.7.4 in the production-minor-patch group across 1 directory (by @openlayers in #17605)
  • chore(deps): bump github/codeql-action from 4.37.1 to 4.37.3 in the actions group (by @openlayers in #17586)
  • chore(deps-dev): bump the development-minor-patch group with 11 updates (by @openlayers in #17587)
  • chore(deps): bump the actions group with 2 updates (by @openlayers in #17574)