v9.0.0
版本发布时间: 2024-02-26 04:49:21
openlayers/openlayers最新发布版本:v9.1.0(2024-03-22 22:41:49)
The 9.0 release add 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 https://github.com/openlayers/openlayers/pull/15315
- Fix reading of flat style icon declutter mode by @MoonE in https://github.com/openlayers/openlayers/pull/15314
- Require Geometry array in GeometryCollection constructor by @MoonE in https://github.com/openlayers/openlayers/pull/15190
- Remove radius1 for regular shapes, use radius instead by @MoonE in https://github.com/openlayers/openlayers/pull/15191
- Increase alpha precision in rgba strings created from color arrays by @mike-000 in https://github.com/openlayers/openlayers/pull/15316
- Fix issue with extractGeometryName in the GeoJSON format by @tschaub in https://github.com/openlayers/openlayers/pull/15319
- Bump marked from 9.1.5 to 10.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15320
- Bump @types/arcgis-rest-api from 10.4.7 to 10.4.8 by @dependabot in https://github.com/openlayers/openlayers/pull/15321
- Bump globby from 13.2.2 to 14.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15322
- Bump @types/offscreencanvas from 2019.7.2 to 2019.7.3 by @dependabot in https://github.com/openlayers/openlayers/pull/15323
- Bump @types/topojson-specification from 1.0.4 to 1.0.5 by @dependabot in https://github.com/openlayers/openlayers/pull/15324
- Bump puppeteer from 21.5.0 to 21.5.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15326
- Bump @types/geojson from 7946.0.12 to 7946.0.13 by @dependabot in https://github.com/openlayers/openlayers/pull/15328
- Bump rollup from 4.3.0 to 4.4.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15329
- Bump @types/pbf from 3.0.4 to 3.0.5 by @dependabot in https://github.com/openlayers/openlayers/pull/15327
- Updates for the 8.2.0 release by @ahocevar in https://github.com/openlayers/openlayers/pull/15333
- Fill pattern for Canvas renderer flat styles by @ahocevar in https://github.com/openlayers/openlayers/pull/15318
- WebGL / Fix hit detection for vector layers by @jahow in https://github.com/openlayers/openlayers/pull/15340
- More specific return types in Format#readFeatures by @ahocevar in https://github.com/openlayers/openlayers/pull/15338
- WebGL / Fix pattern fill issues with vector tiles by @jahow in https://github.com/openlayers/openlayers/pull/15317
- Bump actions/github-script from 6 to 7 by @dependabot in https://github.com/openlayers/openlayers/pull/15354
- Extend WebGL color operator by @lysek in https://github.com/openlayers/openlayers/pull/15359
- Fix WMTS Capabilities Layer.BoundingBox by @ltshb in https://github.com/openlayers/openlayers/pull/15364
- Revert "Fix WMTS Capabilities Layer.BoundingBox" by @ltshb in https://github.com/openlayers/openlayers/pull/15366
- Fix vectortile opacity in layer groups by @ahocevar in https://github.com/openlayers/openlayers/pull/15365
- Align sources to pixels in stitchContext when interpolate false by @mike-000 in https://github.com/openlayers/openlayers/pull/15343
- Bump eslint from 8.53.0 to 8.54.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15353
- Bump rollup-plugin-external-globals from 0.9.0 to 0.9.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15352
- Bump rollup from 4.4.0 to 4.5.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15351
- Bump puppeteer from 21.5.1 to 21.5.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15350
- Bump metalsmith from 2.6.1 to 2.6.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15349
- Bump @types/proj4 from 2.5.4 to 2.5.5 by @dependabot in https://github.com/openlayers/openlayers/pull/15348
- Bump rollup from 4.5.0 to 4.5.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15373
- Create css matrix without using the DOM by @ahocevar in https://github.com/openlayers/openlayers/pull/15344
- Accept any service URL for arcgisRest by @ahocevar in https://github.com/openlayers/openlayers/pull/15355
- End drawing when appendCoordinates() hits maxPoints by @ahocevar in https://github.com/openlayers/openlayers/pull/15371
- Support case expressions in Canvas rendering by @tschaub in https://github.com/openlayers/openlayers/pull/15376
- Fix TransactionResponse type by @ahocevar in https://github.com/openlayers/openlayers/pull/15375
- Improve return type of JSONFeatureFormat#readFeature by @ahocevar in https://github.com/openlayers/openlayers/pull/15377
- Make empty GeoJSON coordinate arrays work again by @ahocevar in https://github.com/openlayers/openlayers/pull/15388
- Bump rollup from 4.5.2 to 4.6.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15383
- Bump ol-mapbox-style from 12.1.0 to 12.1.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15382
- Bump typescript from 5.2.2 to 5.3.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15381
- Fix WMTS Capabilities Layer.BoundingBox by @ltshb in https://github.com/openlayers/openlayers/pull/15392
- Bump clean-css-cli from 5.6.2 to 5.6.3 by @dependabot in https://github.com/openlayers/openlayers/pull/15398
- Bump rollup from 4.6.0 to 4.6.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15396
- Bump fs-extra from 11.1.1 to 11.2.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15399
- Bump eslint from 8.54.0 to 8.55.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15397
- Bump marked from 10.0.0 to 11.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15400
- Replace :package: with 📦 by @tschaub in https://github.com/openlayers/openlayers/pull/15405
- Update link to terrain-rgb in sea-level example by @fredj in https://github.com/openlayers/openlayers/pull/15403
- Fix return type for getOverlayById by @helgee in https://github.com/openlayers/openlayers/pull/15412
- Fix
updateParams
in ImageMapGuide and ImageArcGISRest by @mike-000 in https://github.com/openlayers/openlayers/pull/15410 - Implement
geometry-type
operator in CPU by @jahow in https://github.com/openlayers/openlayers/pull/15414 - Bump rollup from 4.6.1 to 4.8.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15419
- Bump marked from 11.0.0 to 11.0.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15420
- Bump puppeteer from 21.5.2 to 21.6.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15421
- Bump typescript from 5.3.2 to 5.3.3 by @dependabot in https://github.com/openlayers/openlayers/pull/15422
- Fix RenderFeature#clone() for Point geometries by @ahocevar in https://github.com/openlayers/openlayers/pull/15433
- Bump github/codeql-action from 2 to 3 by @dependabot in https://github.com/openlayers/openlayers/pull/15434
- Bump dawidd6/action-download-artifact from 2 to 3 by @dependabot in https://github.com/openlayers/openlayers/pull/15435
- Bump actions/upload-artifact from 3 to 4 by @dependabot in https://github.com/openlayers/openlayers/pull/15436
- Bump marked from 11.0.1 to 11.1.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15437
- Bump puppeteer from 21.6.0 to 21.6.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15438
- Bump eslint from 8.55.0 to 8.56.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15439
- Bump rollup from 4.8.0 to 4.9.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15440
- Bump geotiff from 2.1.0 to 2.1.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15449
- Handle user coordinates in ZoomToExtent by @mike-000 in https://github.com/openlayers/openlayers/pull/15448
- Add Graticule rendering test by @mike-000 in https://github.com/openlayers/openlayers/pull/15450
- Add nanometer to scaleline by @sunilkpai in https://github.com/openlayers/openlayers/pull/15453
- Bump rollup from 4.9.1 to 4.9.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15457
- Bump source-map-loader from 4.0.1 to 4.0.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15456
- Bump webpack-dev-middleware from 6.1.1 to 7.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15454
- Bump marked from 11.1.0 to 11.1.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15455
- Make VectorLayer#getFeatures(pixel) work with useGeographic() by @ahocevar in https://github.com/openlayers/openlayers/pull/15432
- Updated linter config by @tschaub in https://github.com/openlayers/openlayers/pull/15460
- Conditional return types for getFeatureById by @ahocevar in https://github.com/openlayers/openlayers/pull/15379
- Bump puppeteer from 21.6.1 to 21.7.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15469
- Bump rollup from 4.9.2 to 4.9.4 by @dependabot in https://github.com/openlayers/openlayers/pull/15468
- Bump follow-redirects from 1.14.8 to 1.15.4 by @dependabot in https://github.com/openlayers/openlayers/pull/15473
- Update examples codesandbox linter config to match #15460 by @mike-000 in https://github.com/openlayers/openlayers/pull/15482
- Generate types for the full build by @ahocevar in https://github.com/openlayers/openlayers/pull/15481
- Bump rollup from 4.9.4 to 4.9.5 by @dependabot in https://github.com/openlayers/openlayers/pull/15487
- Bump copy-webpack-plugin from 11.0.0 to 12.0.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15486
- Bump proj4 from 2.9.2 to 2.10.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15485
- Bump source-map-loader from 4.0.2 to 5.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15502
- Bump rollup from 4.9.5 to 4.9.6 by @dependabot in https://github.com/openlayers/openlayers/pull/15501
- Bump copy-webpack-plugin from 12.0.1 to 12.0.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15500
- Bump geotiff from 2.1.1 to 2.1.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15499
- Bump rollup-plugin-external-globals from 0.9.1 to 0.9.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15498
- Add coalesce operator to expressions by @slippyr4 in https://github.com/openlayers/openlayers/pull/15504
- Bump puppeteer from 21.7.0 to 21.9.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15513
- Bump marked from 11.1.1 to 11.2.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15514
- Bump ol-stac from 1.0.0-beta.6 to 1.0.0-beta.7 by @dependabot in https://github.com/openlayers/openlayers/pull/15516
- Bump webpack from 5.89.0 to 5.90.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15515
- Add GPX metadata parsing by @pakb in https://github.com/openlayers/openlayers/pull/15507
- Change Geometry.transform return type to 'this' by @fredj in https://github.com/openlayers/openlayers/pull/15523
- Clip to source tile grid in ReprojDataTile by @mike-000 in https://github.com/openlayers/openlayers/pull/15484
- Generics for vector and vectortile source's formats by @ahocevar in https://github.com/openlayers/openlayers/pull/15512
- Bump ol-mapbox-style from 12.1.1 to 12.2.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15533
- Bump marked from 11.2.0 to 12.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15531
- Bump @types/geojson from 7946.0.13 to 7946.0.14 by @dependabot in https://github.com/openlayers/openlayers/pull/15536
- Bump karma-webpack from 5.0.0 to 5.0.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15535
- Bump ol-stac from 1.0.0-beta.7 to 1.0.0-beta.8 by @dependabot in https://github.com/openlayers/openlayers/pull/15534
- Bump puppeteer from 21.9.0 to 22.0.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15532
- Bump webpack from 5.90.0 to 5.90.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15537
- Check OGC
orderedAxes
before defaulting to projection axis orientation by @mike-000 in https://github.com/openlayers/openlayers/pull/15524 - WMTS
wmtsCap['Contents']['Layer']
could be undefined by @nboisteault in https://github.com/openlayers/openlayers/pull/15525 - New decluttering by @ahocevar in https://github.com/openlayers/openlayers/pull/15466
- Fix typos in upgrade-notes.md by @fredj in https://github.com/openlayers/openlayers/pull/15543
- WebGL / Improve line antialiasing by @jahow in https://github.com/openlayers/openlayers/pull/15554
- Add note about cartesian measurements on scaleline by @weskamm in https://github.com/openlayers/openlayers/pull/15556
- Bump semver from 7.5.4 to 7.6.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15551
- Bump rollup from 4.9.6 to 4.10.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15550
- Bump mocha from 10.2.0 to 10.3.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15549
- Bump globby from 14.0.0 to 14.0.1 by @dependabot in https://github.com/openlayers/openlayers/pull/15548
- Bump geotiff from 2.1.2 to 2.1.3 by @dependabot in https://github.com/openlayers/openlayers/pull/15547
- Bump rollup from 4.10.0 to 4.12.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15560
- Bump webpack-dev-server from 4.15.1 to 5.0.2 by @dependabot in https://github.com/openlayers/openlayers/pull/15562
- Bump webpack from 5.90.1 to 5.90.3 by @dependabot in https://github.com/openlayers/openlayers/pull/15565
- Google maps source by @tschaub in https://github.com/openlayers/openlayers/pull/15465
- Dispatch prerender event before image rendering in hybrid mode by @ahocevar in https://github.com/openlayers/openlayers/pull/15566
- Export Google source from ol/source.js by @tschaub in https://github.com/openlayers/openlayers/pull/15567
- Avoid circular ol <-> ol-mapbox-style dependency from old versions by @ahocevar in https://github.com/openlayers/openlayers/pull/15569
- Also defer rendering of image layers when decluttering is needed by @ahocevar in https://github.com/openlayers/openlayers/pull/15570
- Bump ip from 1.1.8 to 1.1.9 by @dependabot in https://github.com/openlayers/openlayers/pull/15573
- Bump puppeteer from 22.0.0 to 22.2.0 by @dependabot in https://github.com/openlayers/openlayers/pull/15561
New Contributors
- @ltshb made their first contribution in https://github.com/openlayers/openlayers/pull/15364
- @helgee made their first contribution in https://github.com/openlayers/openlayers/pull/15412
- @sunilkpai made their first contribution in https://github.com/openlayers/openlayers/pull/15453
- @slippyr4 made their first contribution in https://github.com/openlayers/openlayers/pull/15504
- @pakb made their first contribution in https://github.com/openlayers/openlayers/pull/15507
Full Changelog: https://github.com/openlayers/openlayers/compare/v8.2.0...v9.0.0
1、 v9.0.0-package.zip 2.61MB
2、 v9.0.0-site.zip 14.87MB