v10.0.0
版本发布时间: 2024-07-27 18:27:59
openlayers/openlayers最新发布版本:v10.3.1(2024-12-06 23:34:09)
10.0.0
The 10.0 release brings several significant improvements, including a new base source for image tile sources with improved performance and simplified code. Flat styles handling has been reworked, removing the need to specify type hints among other internal improvements. In the WebGL renderer, a memory allocation issue has been fixed. For better developer experience, we improved generic types and fixed some issues with types, stabilizing the back and forth on generics in v9.x.
Breaking changes are very minor, so we recommend upgrading to v10.x for all v9.x users.
Backwards incompatible changes
ol/source/VectorTile
: getFeaturesInExtent()
method moved to ol/layer/VectorTile
The getFeaturesInExtent()
method of ol/source/VectorTile
has been moved to ol/layer/VectorTile
. The signature and behavior have not changed, so all that needs to be done is change code from e.g.
layer.getSource().getFeaturesInExtent(extent);
to
layer.getFeaturesInExtent(extent);
Flat styles: Removal of Type hints in 'get'
expressions
For the Canvas renderer, additional arguments to the 'get'
call expression now mean access to nested properties or array items. The expression system has been improved so type hints are no longer needed. If you were previously using a type hint in a get
expression, you have to change the expression from e.g.
['get', 'foo', 'number[]']
to
['get', 'foo']
Other changes
Removal of the opaque
option from all Tile
sources
The opaque
option was previously used to hint the renderer to perform some optimizations on layers known to be fully opaque. This is no longer needed, and the option has been removed.
List of all changes
See below for a complete list of features and fixes.
- Remove outdated doc in FAQ (by @Makio64 in https://github.com/openlayers/openlayers/pull/16026)
- Fix cluster geometryFunction return type (by @NiclasSchmitz in https://github.com/openlayers/openlayers/pull/16021)
- Do not try to handle negative map sizes (by @ahocevar in https://github.com/openlayers/openlayers/pull/16002)
- Re-implement getFeaturesInExtent() method for vector tiles (by @ahocevar in https://github.com/openlayers/openlayers/pull/16007)
- Only reset an existing renderer in
setStyle()
(by @mike-000 in https://github.com/openlayers/openlayers/pull/16006) - Fix Linked list concatenateion (by @MoonE in https://github.com/openlayers/openlayers/pull/16003)
- Remove superfluous template argument in ol/layer/VectorTile (by @MoonE in https://github.com/openlayers/openlayers/pull/15999)
- Enable no implicit override check (by @MoonE in https://github.com/openlayers/openlayers/pull/15997)
- Remove last remaining
@inheritDoc
(by @MoonE in https://github.com/openlayers/openlayers/pull/15996) - No implicit this (by @MoonE in https://github.com/openlayers/openlayers/pull/15989)
- Fix Raster source attributions bugs (by @MoonE in https://github.com/openlayers/openlayers/pull/15990)
- Cleanup code and fix type declaration (by @MoonE in https://github.com/openlayers/openlayers/pull/15983)
- Add type declarations for mocha and expect.js (by @openlayers in https://github.com/openlayers/openlayers/pull/15982)
- Better generics for rbush (by @MoonE in https://github.com/openlayers/openlayers/pull/15979)
- Attempt to fix deploy preview for pull requests (by @ahocevar in https://github.com/openlayers/openlayers/pull/15973)
- Modernize code (by @MoonE in https://github.com/openlayers/openlayers/pull/15971)
- Rename protected properties, mark properties as private (by @MoonE in https://github.com/openlayers/openlayers/pull/15972)
- Recenter map on overview map click (by @ahocevar in https://github.com/openlayers/openlayers/pull/15963)
- Fix some source createLoader bugs (by @MoonE in https://github.com/openlayers/openlayers/pull/15970)
- Fix control/OverviewMap for setView() (by @kikuchan in https://github.com/openlayers/openlayers/pull/15968)
- Fix control/OverviewMap for useGeographic() (by @kikuchan in https://github.com/openlayers/openlayers/pull/15967)
- Homogenize only one level of KML MultiGeometry (by @mike-000 in https://github.com/openlayers/openlayers/pull/15932)
- WebGL Vector Layer: Clear existing buffers before allocating new ones (by @jahow in https://github.com/openlayers/openlayers/pull/15943)
- Fix polyfills link (by @gtt-project in https://github.com/openlayers/openlayers/pull/15946)
- New image tile source (by @ahocevar in https://github.com/openlayers/openlayers/pull/15905)
- Correct grammatically incorrect use of "an" in documentation (by @mike-000 in https://github.com/openlayers/openlayers/pull/15916)
- Provide expected type when parsing expressions (by @tschaub in https://github.com/openlayers/openlayers/pull/15906)
- Make non-string text styles work again (by @ahocevar in https://github.com/openlayers/openlayers/pull/15898)
- Use offset from start instead of full coordinate to improve getArea() precision (by @mike-000 in https://github.com/openlayers/openlayers/pull/15859)
- Extract feature type from the source's type arguments (by @ahocevar in https://github.com/openlayers/openlayers/pull/15887)
- Consistent generics for vector(tile) layers, sources, formats (by @ahocevar in https://github.com/openlayers/openlayers/pull/15869)
- Fix match expression with numeric size types (by @M393 in https://github.com/openlayers/openlayers/pull/15883)
- VectorSource improvements (by @M393 in https://github.com/openlayers/openlayers/pull/15880)
- Release v9.2.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/15877)
- Fix case expression with numeric size types (by @M393 in https://github.com/openlayers/openlayers/pull/15876)
- Fix allow to pass apiOptions array to Google source (by @KenyStev in https://github.com/openlayers/openlayers/pull/15863)
- Support nested properties with the 'get' expression (by @ahocevar in https://github.com/openlayers/openlayers/pull/15813)
- Fix typo in Snap interaction docs (by @matthias-ccri in https://github.com/openlayers/openlayers/pull/15861)
- Release v9.2.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/15855)
- Add rect example (by @christophfriedrich in https://github.com/openlayers/openlayers/pull/15841)
- Fix execute() arguments (by @ahocevar in https://github.com/openlayers/openlayers/pull/15851)
Dependency Updates
- Bump rollup from 4.18.1 to 4.19.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/16012)
- Bump mocha from 10.6.0 to 10.7.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/16015)
- Bump @octokit/rest from 21.0.0 to 21.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/16014)
- Bump @typescript-eslint/parser from 7.16.0 to 7.16.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/16013)
- Bump webpack-dev-middleware from 7.2.1 to 7.3.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/16011)
- Bump puppeteer from 22.13.0 to 22.13.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/16010)
- Bump semver from 7.6.2 to 7.6.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/16009)
- Bump rollup from 4.18.0 to 4.18.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15994)
- Bump webpack from 5.92.1 to 5.93.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15992)
- Bump puppeteer from 22.12.1 to 22.13.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15993)
- Bump pbf from 3.2.1 to 4.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15980)
- Bump @typescript-eslint/parser from 7.13.1 to 7.16.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15981)
- Bump typescript from 5.5.2 to 5.5.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/15976)
- Bump marked from 12.0.2 to 13.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/15966)
- Bump puppeteer from 22.12.0 to 22.12.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15958)
- Bump mocha from 10.5.2 to 10.6.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15965)
- Bump earcut from 2.2.4 to 3.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15956)
- Bump rollup-plugin-external-globals from 0.10.0 to 0.11.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15953)
- Bump globby from 14.0.1 to 14.0.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/15959)
- Bump mocha from 10.4.0 to 10.5.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/15957)
- Bump pixelmatch from 5.3.0 to 6.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15955)
- Bump ol-mapbox-style from 12.3.3 to 12.3.4 (by @openlayers in https://github.com/openlayers/openlayers/pull/15952)
- Bump rbush from 3.0.1 to 4.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15951)
- Bump ws, engine.io and socket.io-adapter (by @openlayers in https://github.com/openlayers/openlayers/pull/15941)
- Bump @octokit/rest from 20.1.1 to 21.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15936)
- Bump typescript from 5.4.5 to 5.5.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/15934)
- Bump @typescript-eslint/parser from 7.13.0 to 7.13.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15935)
- Bump puppeteer from 22.11.1 to 22.12.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15937)
- Bump webpack from 5.92.0 to 5.92.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15938)
- Bump puppeteer from 22.10.0 to 22.11.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15918)
- Bump webpack from 5.91.0 to 5.92.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15919)
- Bump @typescript-eslint/parser from 7.12.0 to 7.13.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15920)
- Bump dawidd6/action-download-artifact from 5 to 6 (by @openlayers in https://github.com/openlayers/openlayers/pull/15922)
- Bump braces from 3.0.2 to 3.0.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/15907)
- Bump ol-mapbox-style from 12.3.2 to 12.3.3 (by @openlayers in https://github.com/openlayers/openlayers/pull/15903)
- Bump dawidd6/action-download-artifact from 3 to 5 (by @openlayers in https://github.com/openlayers/openlayers/pull/15904)
- Bump @typescript-eslint/parser from 7.11.0 to 7.12.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15902)
- Bump @rollup/plugin-commonjs from 25.0.8 to 26.0.1 (by @openlayers in https://github.com/openlayers/openlayers/pull/15901)
- Bump @typescript-eslint/parser from 7.10.0 to 7.11.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15888)
- Bump rollup from 4.17.2 to 4.18.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15873)
- Bump @rollup/plugin-commonjs from 25.0.7 to 25.0.8 (by @openlayers in https://github.com/openlayers/openlayers/pull/15872)
- Bump @typescript-eslint/parser from 7.9.0 to 7.10.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15874)
- Bump puppeteer from 22.9.0 to 22.10.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15871)
- Bump semver from 7.6.0 to 7.6.2 (by @openlayers in https://github.com/openlayers/openlayers/pull/15848)
- Bump puppeteer from 22.8.2 to 22.9.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15846)
- Bump sinon from 17.0.1 to 18.0.0 (by @openlayers in https://github.com/openlayers/openlayers/pull/15847)
1、 v10.0.0-package.zip 2.63MB
2、 v10.0.0-site.zip 14.88MB