With more than 40 pull requests, the 10.4 release brings performance improvements, bug fixes, better TypeScript generics and new features. New features include a convenience Image
layer loader for debugging MapServer map files using the MapServer CGI API, and an experimental WebGLVectorTile
layer.
Upgrade notes
Deprecation of ol/layer/WebGLPoints
Use ol/layer/WebGLVector
instead. Besides rendering points it will also render lines and polygons.
In most cases this is a drop-in replacement. To use filtering the style and filter have to be in a nested object.
// Before
new WebGLPointsLayer({
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
style: {
'circle-radius': 8,
'circle-fill-color': 'blue',
},
source: vectorSource,
})
// After
new WebGLVectorLayer({
style: [{
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
style: {
'circle-radius': 8,
'circle-fill-color': 'blue',
},
}],
source: vectorSource,
})
ol-mapbox-style compatibility
This version of OpenLayers is only compatible with ol-mapbox-style@12.4.0
or higher.
Returning false from a one-time listener added with once
Returning false from the listener function will now stop propagation, when the listener is added with once
.
Previously this only worked with the on
method.
The filter
option for WebGLPointsLayer
has changed
The filter option for the WebGLPointsLayer
must now be specified alongside other options instead of being part of the style
object. Note that the WebGLPointsLayer
is not part of the stable API and is subject to breaking changes between major releases.
// Before
new WebGLPointsLayer({
style: {
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
'circle-radius': 8,
'circle-fill-color': 'blue',
},
source: vectorSource,
})
// Now
new WebGLPointsLayer({
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
style: {
'circle-radius': 8,
'circle-fill-color': 'blue',
},
source: vectorSource,
})
Get ready for future changes
We're planning to stop providing barrel files, which will impact how you import modules from OpenLayers. See #16461 for details. To get your code ready for that upcoming change, you can already help us test the replace-barrel-imports
codemod from the @openlayers/codemod package.
List of all changes
- Updates for the 10.3.1 release by @jahow in #16435
- Bump pmtiles from 3.2.1 to 4.0.1 by @dependabot in #16418
- Skip tiles not in rotated viewport by @MoonE in #16443
- Intersection performance improvements by @MoonE in #16442
- Remove duplicate property from CanvasTileLayerRenderer by @MoonE in #16445
- Updates to work with ESLint 9 by @tschaub in #16441
- Bump dawidd6/action-download-artifact from 6 to 7 by @dependabot in #16421
- Bump @types/geojson from 7946.0.14 to 7946.0.15 by @dependabot in #16447
- Bump puppeteer from 23.9.0 to 23.10.1 by @dependabot in #16448
- Bump rollup from 4.28.0 to 4.28.1 by @dependabot in #16449
- Bump mocha from 10.8.2 to 11.0.1 by @dependabot in #16450
- Bump webpack from 5.96.1 to 5.97.1 by @dependabot in #16451
- Bump express from 4.21.1 to 4.21.2 by @dependabot in #16452
- Change tile state to EMPTY when releasing tiles by @ahocevar in #16455
- fix: check for ImageBitmap support in ImageWrapper load by @rwd in #16458
- Remove expandUrl re-export by @ahocevar in #16459
- Update High DPI WMTS capabilities url by @mike-000 in #16463
- Replace barrel imports in examples by @tschaub in #16465
- Consistent use of relative imports by @tschaub in #16464
- Lazily initialize VectorStyleRenderer Worker by @M393 in #16460
- Remove IE11 only MSFullscreenChange event handling by @MoonE in #16471
- Templatize TileQueue by @MoonE in #16470
- Returning false from once-listener should stop event propagation by @MoonE in #16469
- Bump puppeteer from 23.10.1 to 23.10.4 by @dependabot in #16473
- Bump marked from 15.0.3 to 15.0.4 by @dependabot in #16474
- Bump @rollup/plugin-commonjs from 28.0.1 to 28.0.2 by @dependabot in #16478
- Bump webpack-dev-server from 5.1.0 to 5.2.0 by @dependabot in #16476
- Bump @typescript-eslint/parser from 8.17.0 to 8.18.0 by @dependabot in #16479
- Bump eslint from 9.16.0 to 9.17.0 by @dependabot in #16477
- Bump pmtiles from 4.0.1 to 4.1.0 by @dependabot in #16472
- Fix function or null/undefined types by @MoonE in #16481
- Fix return type of ImageObjectPromiseLoader by @MoonE in #16480
- Include site directory in npm run lint by @MoonE in #16482
- Bump @rollup/plugin-node-resolve from 15.3.0 to 16.0.0 by @dependabot in #16475
- Add validation to prevent incorrect calculations when handling undefined values in the updateElement_ method by @edsonmsj in #16468
- Clear renderer on layer source changes by @MelkorCC in #16488
- Update test docs by @ahocevar in #16496
- Bump earcut from 3.0.0 to 3.0.1 by @dependabot in #16501
- Bump rollup from 4.28.1 to 4.29.1 by @dependabot in #16502
- Bump puppeteer from 23.10.4 to 23.11.1 by @dependabot in #16503
- Bump webpack-cli from 5.1.4 to 6.0.1 by @dependabot in #16504
- Bump @typescript-eslint/parser from 8.18.0 to 8.18.1 by @dependabot in #16505
- Merge style/webgl and style/flat formats into a single one by @jahow in #16492
- An EMPTY tile stays EMPTY by @ahocevar in #16513
- Only peek tiles we're not sure we're going to use by @ahocevar in #16509
- Bump @turf/length from 7.1.0 to 7.2.0 by @dependabot in #16515
- Bump @turf/along from 7.1.0 to 7.2.0 by @dependabot in #16516
- Bump @typescript-eslint/parser from 8.18.1 to 8.18.2 by @dependabot in #16517
- Fix for undefined
renderedProjection
in web worker's offscreen canvas layer example by @bilskip in #16522 - Fix VectorTile source removeSourceTiles by @MoonE in #16427
- Ignore site build directory by @ahocevar in #16518
- Ignore empty tiles to avoid endless loop by @mike-000 in #16519
- Fix considering insertVertexCondition on segment hover in modify interaction by @viktorijasolovjova in #16506
- Reset layer style when original GeoTIFF source is ready by @jcphill in #16490
- Fix WebGLPoints layer with non-point geometry by @MoonE in #16437
- Bump rollup from 4.29.1 to 4.30.0 by @dependabot in #16528
- Bump @typescript-eslint/parser from 8.18.2 to 8.19.0 by @dependabot in #16527
- Bump marked from 15.0.4 to 15.0.5 by @dependabot in #16526
- Bump @types/proj4 from 2.5.5 to 2.5.6 by @dependabot in #16525
- Deprecate ol/layer/WebGLPoints by @MoonE in #16529
- Introduce a WebGLVectorTileLayer class by @jahow in #16524
- Make forEachFeatureAtCoordinate work when decluttering without features by @ahocevar in #16539
- Bump typescript from 5.7.2 to 5.7.3 by @dependabot in #16547
- Bump puppeteer from 23.11.1 to 24.0.0 by @dependabot in #16548
- Bump @typescript-eslint/parser from 8.19.0 to 8.19.1 by @dependabot in #16549
- Bump eslint from 9.17.0 to 9.18.0 by @dependabot in #16550
- Bump marked from 15.0.5 to 15.0.6 by @dependabot in #16552
- Bump @octokit/rest from 21.0.2 to 21.1.0 by @dependabot in #16553
- Add test for XYZ source retina tile reprojection by @mike-000 in #16540
- Bump rollup from 4.30.0 to 4.30.1 by @dependabot in #16551
- Register move and up event on parent map's owner document by @ahocevar in #16545
- Set WMS TRANSPARENT parameter default value to the correct value according to the specification by @MelkorCC in #16560
- Bump puppeteer from 24.0.0 to 24.1.0 by @dependabot in #16565
- Bump rollup from 4.30.1 to 4.31.0 by @dependabot in #16567
- Bump @typescript-eslint/parser from 8.19.1 to 8.20.0 by @dependabot in #16566
- Bump fs-extra from 11.2.0 to 11.3.0 by @dependabot in #16568
- Bump pmtiles from 4.1.0 to 4.2.1 by @dependabot in #16569
- Do not fail when reprojecting geometries with empty coordinate arrays by @ahocevar in #16556
- Fix text background rendering by @ahocevar in #16557
- WebGL / Filter geometries before processing them for rendering (reworked) by @jahow in #16564
- Re-arm TypeScript libcheck tests, fix TypeScript issues by @ahocevar in #16579
- Bump @types/geojson from 7946.0.15 to 7946.0.16 by @dependabot in #16580
- Bump ol-stac from 1.0.0-beta.10 to 1.0.0-rc.5 by @dependabot in #16581
- Bump mocha from 11.0.1 to 11.1.0 by @dependabot in #16582
- Bump @typescript-eslint/parser from 8.20.0 to 8.21.0 by @dependabot in #16583
- Bump color-space from 2.0.1 to 2.1.0 by @dependabot in #16584
- Bump puppeteer from 24.1.0 to 24.1.1 by @dependabot in #16585
- Bump dawidd6/action-download-artifact from 7 to 8 by @dependabot in #16588
- Bump eslint from 9.18.0 to 9.19.0 by @dependabot in #16586
- Bump rollup from 4.31.0 to 4.32.0 by @dependabot in #16587
- Add color-rgba types by @MoonE in #16590
- New ImageMapServer source by @geographika in #16591
New Contributors
- @rwd made their first contribution in #16458
- @edsonmsj made their first contribution in #16468
- @MelkorCC made their first contribution in #16488
- @bilskip made their first contribution in #16522
- @viktorijasolovjova made their first contribution in #16506
- @jcphill made their first contribution in #16490
- @geographika made their first contribution in #16591
Full Changelog: v10.3.1...v10.4.0