The 9.0 release adds several new features, including a Google Maps source (finally!), improved WebGL line rendering, and a new symbol and text decluttering implementation. We also improved and broadened flat styles support for both WebGL and Canvas 2D renderers. For better developer experience, we made more types generic and fixed some issues with types.
Backwards incompatible changes
Improved render order of decluttered items
Decluttered items in Vector and VectorTile layers now maintain the render order of the layers and within a layer. They do not get lifted to a higher place in the stack any more.
For most use cases, this is the desired behavior. If, however, you've been relying on the previous behavior, you now have to create separate layers above the layer stack, with just the styles for the declutter items.
Removal of Map#flushDeclutterItems()
It is no longer necessary to call this function to put layers above decluttered symbols and text, because decluttering no longer lifts elements above the layer stack.
To upgrade, simply remove the code where you use the flushDeclutterItems()
method.
Changes in ol/style
- Removed the
ol/style/RegularShape
'sradius1
property. Useradius
for regular polygons orradius
andradius2
for stars. - Removed the
shape-radius1
property fromol/style/flat~FlatShape
. Useshape-radius
instead.
GeometryCollection
constructor
ol/geom/GeometryCollection
can no longer be created without providing a Geometry array. Empty arrays are still valid.
ol/interaction/Draw
- The
finishDrawing()
method now returns the drawn feature ornull
if no drawing could be finished. Previously it returnedundefined
.
What's Changed
- Bump dev version to v9 by @MoonE in #15315
- Fix reading of flat style icon declutter mode by @MoonE in #15314
- Require Geometry array in GeometryCollection constructor by @MoonE in #15190
- Remove radius1 for regular shapes, use radius instead by @MoonE in #15191
- Increase alpha precision in rgba strings created from color arrays by @mike-000 in #15316
- Fix issue with extractGeometryName in the GeoJSON format by @tschaub in #15319
- Bump marked from 9.1.5 to 10.0.0 by @dependabot in #15320
- Bump @types/arcgis-rest-api from 10.4.7 to 10.4.8 by @dependabot in #15321
- Bump globby from 13.2.2 to 14.0.0 by @dependabot in #15322
- Bump @types/offscreencanvas from 2019.7.2 to 2019.7.3 by @dependabot in #15323
- Bump @types/topojson-specification from 1.0.4 to 1.0.5 by @dependabot in #15324
- Bump puppeteer from 21.5.0 to 21.5.1 by @dependabot in #15326
- Bump @types/geojson from 7946.0.12 to 7946.0.13 by @dependabot in #15328
- Bump rollup from 4.3.0 to 4.4.0 by @dependabot in #15329
- Bump @types/pbf from 3.0.4 to 3.0.5 by @dependabot in #15327
- Updates for the 8.2.0 release by @ahocevar in #15333
- Fill pattern for Canvas renderer flat styles by @ahocevar in #15318
- WebGL / Fix hit detection for vector layers by @jahow in #15340
- More specific return types in Format#readFeatures by @ahocevar in #15338
- WebGL / Fix pattern fill issues with vector tiles by @jahow in #15317
- Bump actions/github-script from 6 to 7 by @dependabot in #15354
- Extend WebGL color operator by @lysek in #15359
- Fix WMTS Capabilities Layer.BoundingBox by @ltshb in #15364
- Revert "Fix WMTS Capabilities Layer.BoundingBox" by @ltshb in #15366
- Fix vectortile opacity in layer groups by @ahocevar in #15365
- Align sources to pixels in stitchContext when interpolate false by @mike-000 in #15343
- Bump eslint from 8.53.0 to 8.54.0 by @dependabot in #15353
- Bump rollup-plugin-external-globals from 0.9.0 to 0.9.1 by @dependabot in #15352
- Bump rollup from 4.4.0 to 4.5.0 by @dependabot in #15351
- Bump puppeteer from 21.5.1 to 21.5.2 by @dependabot in #15350
- Bump metalsmith from 2.6.1 to 2.6.2 by @dependabot in #15349
- Bump @types/proj4 from 2.5.4 to 2.5.5 by @dependabot in #15348
- Bump rollup from 4.5.0 to 4.5.2 by @dependabot in #15373
- Create css matrix without using the DOM by @ahocevar in #15344
- Accept any service URL for arcgisRest by @ahocevar in #15355
- End drawing when appendCoordinates() hits maxPoints by @ahocevar in #15371
- Support case expressions in Canvas rendering by @tschaub in #15376
- Fix TransactionResponse type by @ahocevar in #15375
- Improve return type of JSONFeatureFormat#readFeature by @ahocevar in #15377
- Make empty GeoJSON coordinate arrays work again by @ahocevar in #15388
- Bump rollup from 4.5.2 to 4.6.0 by @dependabot in #15383
- Bump ol-mapbox-style from 12.1.0 to 12.1.1 by @dependabot in #15382
- Bump typescript from 5.2.2 to 5.3.2 by @dependabot in #15381
- Fix WMTS Capabilities Layer.BoundingBox by @ltshb in #15392
- Bump clean-css-cli from 5.6.2 to 5.6.3 by @dependabot in #15398
- Bump rollup from 4.6.0 to 4.6.1 by @dependabot in #15396
- Bump fs-extra from 11.1.1 to 11.2.0 by @dependabot in #15399
- Bump eslint from 8.54.0 to 8.55.0 by @dependabot in #15397
- Bump marked from 10.0.0 to 11.0.0 by @dependabot in #15400
- Replace 📦 with 📦 by @tschaub in #15405
- Update link to terrain-rgb in sea-level example by @fredj in #15403
- Fix return type for getOverlayById by @helgee in #15412
- Fix
updateParams
in ImageMapGuide and ImageArcGISRest by @mike-000 in #15410 - Implement
geometry-type
operator in CPU by @jahow in #15414 - Bump rollup from 4.6.1 to 4.8.0 by @dependabot in #15419
- Bump marked from 11.0.0 to 11.0.1 by @dependabot in #15420
- Bump puppeteer from 21.5.2 to 21.6.0 by @dependabot in #15421
- Bump typescript from 5.3.2 to 5.3.3 by @dependabot in #15422
- Fix RenderFeature#clone() for Point geometries by @ahocevar in #15433
- Bump github/codeql-action from 2 to 3 by @dependabot in #15434
- Bump dawidd6/action-download-artifact from 2 to 3 by @dependabot in #15435
- Bump actions/upload-artifact from 3 to 4 by @dependabot in #15436
- Bump marked from 11.0.1 to 11.1.0 by @dependabot in #15437
- Bump puppeteer from 21.6.0 to 21.6.1 by @dependabot in #15438
- Bump eslint from 8.55.0 to 8.56.0 by @dependabot in #15439
- Bump rollup from 4.8.0 to 4.9.1 by @dependabot in #15440
- Bump geotiff from 2.1.0 to 2.1.1 by @dependabot in #15449
- Handle user coordinates in ZoomToExtent by @mike-000 in #15448
- Add Graticule rendering test by @mike-000 in #15450
- Add nanometer to scaleline by @sunilkpai in #15453
- Bump rollup from 4.9.1 to 4.9.2 by @dependabot in #15457
- Bump source-map-loader from 4.0.1 to 4.0.2 by @dependabot in #15456
- Bump webpack-dev-middleware from 6.1.1 to 7.0.0 by @dependabot in #15454
- Bump marked from 11.1.0 to 11.1.1 by @dependabot in #15455
- Make VectorLayer#getFeatures(pixel) work with useGeographic() by @ahocevar in #15432
- Updated linter config by @tschaub in #15460
- Conditional return types for getFeatureById by @ahocevar in #15379
- Bump puppeteer from 21.6.1 to 21.7.0 by @dependabot in #15469
- Bump rollup from 4.9.2 to 4.9.4 by @dependabot in #15468
- Bump follow-redirects from 1.14.8 to 1.15.4 by @dependabot in #15473
- Update examples codesandbox linter config to match #15460 by @mike-000 in #15482
- Generate types for the full build by @ahocevar in #15481
- Bump rollup from 4.9.4 to 4.9.5 by @dependabot in #15487
- Bump copy-webpack-plugin from 11.0.0 to 12.0.1 by @dependabot in #15486
- Bump proj4 from 2.9.2 to 2.10.0 by @dependabot in #15485
- Bump source-map-loader from 4.0.2 to 5.0.0 by @dependabot in #15502
- Bump rollup from 4.9.5 to 4.9.6 by @dependabot in #15501
- Bump copy-webpack-plugin from 12.0.1 to 12.0.2 by @dependabot in #15500
- Bump geotiff from 2.1.1 to 2.1.2 by @dependabot in #15499
- Bump rollup-plugin-external-globals from 0.9.1 to 0.9.2 by @dependabot in #15498
- Add coalesce operator to expressions by @slippyr4 in #15504
- Bump puppeteer from 21.7.0 to 21.9.0 by @dependabot in #15513
- Bump marked from 11.1.1 to 11.2.0 by @dependabot in #15514
- Bump ol-stac from 1.0.0-beta.6 to 1.0.0-beta.7 by @dependabot in #15516
- Bump webpack from 5.89.0 to 5.90.0 by @dependabot in #15515
- Add GPX metadata parsing by @pakb in #15507
- Change Geometry.transform return type to 'this' by @fredj in #15523
- Clip to source tile grid in ReprojDataTile by @mike-000 in #15484
- Generics for vector and vectortile source's formats by @ahocevar in #15512
- Bump ol-mapbox-style from 12.1.1 to 12.2.0 by @dependabot in #15533
- Bump marked from 11.2.0 to 12.0.0 by @dependabot in #15531
- Bump @types/geojson from 7946.0.13 to 7946.0.14 by @dependabot in #15536
- Bump karma-webpack from 5.0.0 to 5.0.1 by @dependabot in #15535
- Bump ol-stac from 1.0.0-beta.7 to 1.0.0-beta.8 by @dependabot in #15534
- Bump puppeteer from 21.9.0 to 22.0.0 by @dependabot in #15532
- Bump webpack from 5.90.0 to 5.90.1 by @dependabot in #15537
- Check OGC
orderedAxes
before defaulting to projection axis orientation by @mike-000 in #15524 - WMTS
wmtsCap['Contents']['Layer']
could be undefined by @nboisteault in #15525 - New decluttering by @ahocevar in #15466
- Fix typos in upgrade-notes.md by @fredj in #15543
- WebGL / Improve line antialiasing by @jahow in #15554
- Add note about cartesian measurements on scaleline by @weskamm in #15556
- Bump semver from 7.5.4 to 7.6.0 by @dependabot in #15551
- Bump rollup from 4.9.6 to 4.10.0 by @dependabot in #15550
- Bump mocha from 10.2.0 to 10.3.0 by @dependabot in #15549
- Bump globby from 14.0.0 to 14.0.1 by @dependabot in #15548
- Bump geotiff from 2.1.2 to 2.1.3 by @dependabot in #15547
- Bump rollup from 4.10.0 to 4.12.0 by @dependabot in #15560
- Bump webpack-dev-server from 4.15.1 to 5.0.2 by @dependabot in #15562
- Bump webpack from 5.90.1 to 5.90.3 by @dependabot in #15565
- Google maps source by @tschaub in #15465
- Dispatch prerender event before image rendering in hybrid mode by @ahocevar in #15566
- Export Google source from ol/source.js by @tschaub in #15567
- Avoid circular ol <-> ol-mapbox-style dependency from old versions by @ahocevar in #15569
- Also defer rendering of image layers when decluttering is needed by @ahocevar in #15570
- Bump ip from 1.1.8 to 1.1.9 by @dependabot in #15573
- Bump puppeteer from 22.0.0 to 22.2.0 by @dependabot in #15561
New Contributors
- @ltshb made their first contribution in #15364
- @helgee made their first contribution in #15412
- @sunilkpai made their first contribution in #15453
- @slippyr4 made their first contribution in #15504
- @pakb made their first contribution in #15507
Full Changelog: v8.2.0...v9.0.0