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
colorandarrayoperators, andinterpolatemixes colors in sRGB on both the Canvas and WebGL renderers; a newinterpolate-hcloperator keeps the perceptual gradient ol/source/Rastergains basic data tile support, and the GeoZarr source can visualize generic n-D datacubes and acceptsstoreOptionsfor 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
VectorImageLayergets crisp rendering on rotated views, with rotated text and point symbols - New
wrapXoption forgetPixelFromCoordinateandgetCoordinateFromPixel, andprojectionoptions 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.
- Replace broken example source with working one (by @ahocevar in #17606)
- Add projection options to WKT format (by @zarathustracode in #17646)
- Use a north arrow in the custom controls example (by @Egge-Jan in #17650)
- Load verbatim examples as ES modules (by @openlayers in #17654)
- Add "station-model-symbology" to 3rd party plugins (by @balladaniel in #17639)
- Fix MouseWheelZoom target cleanup (by @tayfuryldz in #17640)
- Add rotateContent option to VectorImageLayer (by @siznjk in #17616)
- Fix #17635: getTileRangeForTileCoordAndZ and add test (by @richard-ling in #17636)
- Add basic data tile support to ol/source/Raster (by @ahocevar in #17631)
- Fix fullscreen control icon on mobile (by @chiimyen in #17629)
- Upload the instance attributes buffer again when the points layer helper is recreated (by @globus243 in #17628)
- Allow example API keys to be overridden in development (by @tschaub in #17626)
- fix: add fetchSessionToken option to Google (by @gioboa in #17624)
- Respect the stride parameter in deflateCoordinate (by @ethanstoner in #17614)
- Handle empty geojson coordinate arrays correctly (by @ahocevar in #17615)
- fix: read nested WFS 2.0 FeatureCollections (by @gioboa in #17622)
- fix: fix RTL text along lines (by @gioboa in #17621)
- Align text to visible part of line only when textAlign is undefined (by @ahocevar in #17619)
- Evaluate the color and array operators in canvas styles (by @ahocevar in #17611)
- Interpolate colors in sRGB, and add interpolate-hcl (by @ahocevar in #17610)
- Load the text overlay worker on demand (by @ahocevar in #17608)
- Add wrapX option to getPixelFromCoordinate and getCoordinateFromPixel (by @fredj in #17514)
- Support visualization of generic n-D GeoZarr datacubes (by @m-mohr in #17602)
- Fix deploy preview (by @ahocevar in #17603)
- Accept any thenable where a Promise was required (by @matousekm in #17600)
- Add storeOptions (headers, credentials) to GeoZarr source (by @m-mohr in #17601)
- Replace sinon with vi in the tests (by @hyeonjun-L in #17594)
- Drop queued tiles that the current view no longer needs (by @xvodddwannaG in #17595)
- fix: wmts options from capabilities matrixSet over projection lookup when configured (by @lubojr in #17593)
- Do not derive the WMTS extent from tile limits (by @xvodddwannaG in #17591)
- Enable strict mode for tsc (by @tschaub in #17588)
- Reworked worker handling in examples (by @tschaub in #17584)
- Include node version in .nvmrc (by @tschaub in #17569)
- Use fes:ResourceId in WFS 2.0.0 transaction filters (by @sobol-sudo in #17583)
- Updates for the 10.10.0 release (by @openlayers in #17582)
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)