The 7.0 release includes an impressive batch of features and fixes from over 90 pull requests. We're excited about a new foundation for WebGL vector rendering. The previous point rendering functionality has been extended to include lines and polygons. The rendering API is still low level and experimental. Future releases will include a higher level styling API.
In developing the new WebGL rendering functionality, we changed the signature for a number of methods on a helper class that had been marked as part of the API in 6.x releases. While this is technically a breaking change, it is unlikely that applications were using this helper class, so upgrades should be straightforward.
We took advantage of the breaking change in the WebGL helper class to remove a few other deprecated parts of the API. In addition, since Microsoft ended support for Internet Explorer a few months ago, we decided to do the same.
Backwards incompatible changes
Removal of deprecated properties and methods
- The
tilePixelRatio
has been removed from theDataTile
source. - The
imageSmoothing
option has been removed from sources. - The
undefinedHTML
option has been removed from theMousePosition
control. - The
forEachLayerAtPixel
method has been removed from theMap
class. - Deprecated options have been removed from the
Overlay
component. - The
labelCache
has been removed from theol/render/canvas.js
module.
Internet Explorer is no longer supported
Please see https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support.
ol/webgl/Helper.js
The Helper
constructor from the ol/webgl/Helper.js
module is no longer part of the public API.
ol/coordinate.js
The toStringHDMS
function from the ol/coordinate.js
module now formats longitude, latitude pairs so that the minutes and seconds are omitted if they are zero. This changes the values displayed on graticules.
ol/layer/Graticule
The default intervals
now align with integer minutes and seconds better suited to the default label formatter. If formatting in decimal degrees you may wish to specify custom intervals
suited to that format.
ol/Collection
Inserting with setAt
or insertAt
beyond the current length used to create a sparse Collection with undefined
inserted for any missing indexes. This will now throw an error instead.
ol/control/MousePosition
The control will now by default keep displaying the last mouse position when the mouse leaves the viewport. With placeholder: ' '
you can keep the old behaviour. The placeholder
option no longer accepts false
as a valid value, instead simply omit the option. The undefinedHTML
option has been removed. You should use placeholder
instead.
ol/PluggableMap
The PluggableMap
class has been removed. If you want to create a custom map class, extend the Map
class instead.
ol/style/Icon and ol/style/RegularShape
ol/style/Image
and subclasses displacement
is no longer scaled with the image. If you previously expected this unintended behavior you should now increase the displacement when setting the scale.
List of all changes
See below for a complete list of features and fixes.
- Make the website deploy job succeed even if there are no changes (by @tschaub in #14017)
- Release actions (by @tschaub in #14014)
- Properly clear and refresh reprojected sources (by @ahocevar in #14013)
- Remove ENABLE_RASTER_REPROJECTION flag (by @ahocevar in #14011)
- Force render after update in Icon Scale example (by @mike-000 in #14012)
- Update ol-mapbox-style to v9.0.0 (by @ahocevar in #14009)
- Replace the Icon Scale example (by @mike-000 in #14007)
- Improve description of displacement in docs (by @mike-000 in #14006)
- Remove IE workarounds for legacy build, examples, and workers (by @tschaub in #13995)
- Use the full table for constructor options (by @tschaub in #13998)
- Do not scale Icon and RegularShape displacement (by @mike-000 in #13975)
- Support user projections in Drag and Drop (by @mike-000 in #14003)
- Avoid append only cache in WebGL tile layers (by @tschaub in #13997)
- Fix immediate renderer text rotation with offset (by @mike-000 in #13981)
- Build and deploy the website (by @openlayers in #13984)
- Small example template fixes (by @marcjansen in #13992)
- Fix wording in API docs (by @marcjansen in #13991)
- Nicer links in the API docs (by @tschaub in #13970)
- Minor adjustments to the website style (by @tschaub in #13989)
- Fix copying of non-linked ol.css, clean example build (by @MoonE in #13988)
- Fix kml-timezone example calculations (by @MoonE in #13982)
- Fix some errors in examples (by @MoonE in #13977)
- Update FontAwesome to v6.1.2 (by @MoonE in #13978)
- Use correct bands with
LUMINANCE_ALPHA
(by @mike-000 in #13974) - Remove opt_ prefix (by @tschaub in #13972)
- Fix bandcount per texture for 8, 12, 16, etc. bands (by @mike-000 in #13973)
- Do not apply #12467 change to Icons (by @mike-000 in #13955)
- Remove more IE compatibility (by @MoonE in #13971)
- Remove workaround and docs for IE 11 (by @tschaub in #13965)
- Remove circular dependency (by @tschaub in #13967)
- Update link to sponsors (by @tschaub in #13968)
- Bundle code for the map on the homepage (by @tschaub in #13966)
- Website build (by @tschaub in #13961)
- Remove polyfills for IE and Android 4 (by @tschaub in #13963)
- Replace VERSION in un-transpiled source (by @MoonE in #13957)
- Use const in docs and other places (by @MoonE in #13958)
- Add few missing new lines in example source listing (by @MoonE in #13959)
- Fix js error in api pages on load (by @MoonE in #13956)
- Minor simplification (by @JakobMiksch in #13953)
- Fix typo and formatting in upgrade notes (by @mike-000 in #13946)
- Fixes to export examples (by @mike-000 in #13947)
- Fix WebGL points layer flaky test (by @jahow in #13944)
- Scaleline (by @MoonE in #13943)
- Improve loading of kmz file in example (by @MoonE in #13942)
- Fix KML default icon anchor with https icon url (by @MoonE in #13941)
- Use nicer functions, remove old code (by @MoonE in #13937)
- Render vector tile vectors in correct sequence for the postrender event (by @ahocevar in #13939)
- Remove workaround for missing TypedArray.from function (by @MoonE in #13936)
- Remove check for context.setLineDash (by @MoonE in #13933)
- Remove deprecated DataTile source
tilePixelRatio
(by @mike-000 in #13930) - Remove input type="range"
change
event listeners whereinput
events are also used (by @mike-000 in #13932) - Remove deprecated
imageSmoothing
source options (by @mike-000 in #13931) - Updated map background (by @tschaub in #13926)
- Include babel for CodeSandbox (by @tschaub in #13923)
- Remove reference to ES6 as ES2017 already listed (by @mike-000 in #13922)
- Style updates for examples and API docs (by @tschaub in #13917)
- Remove Google Analytics and cookie consent (by @tschaub in #13916)
- Fix map render test (by @MoonE in #13915)
- Uniformly grayscale controls (by @tschaub in #13908)
- Remove PluggableMap (by @tschaub in #13914)
- Remove MousePosition's deprecated undefinedHTML option (by @MoonE in #13911)
- Remove IconImage color fallback for IE (by @MoonE in #13912)
- Remove IE fallbacks (by @MoonE in #13907)
- Fix editing of export-map example on codesandbox (by @MoonE in #13910)
- Improve Collection type-safety (by @MoonE in #13902)
- Re-export the link interaction from the interactions module (by @tschaub in #13906)
- Replace enums with typedefs (by @MoonE in #13905)
- Accept an object literal for static layer styling (by @tschaub in #13900)
- Update jsdoc-plugin-typescript to fix markdown in type annotations (by @ahocevar in #13903)
- Wait until first load to create icon image (by @tschaub in #13899)
- Make Text options typesafe (by @MoonE in #13901)
- Align graticule default intervals to minutes and seconds (by @mike-000 in #13897)
- Publish untranspiled sources (by @tschaub in #13891)
- Improve reprojection WMS config for better performance (by @ahocevar in #13880)
- Omit minutes and seconds from HDMS formatting if zero (by @tschaub in #13893)
- Use Object.assign (by @tschaub in #13888)
- Remove unused worker (by @tschaub in #13892)
- Remove find and findIndex from array module (by @tschaub in #13887)
- Use Math.cosh and Math.log2 (by @tschaub in #13890)
- Use Object.values (by @tschaub in #13889)
- Remove workaround for Array.prototype.includes (by @tschaub in #13884)
- Codesandbox and bundler improvements for examples (by @ahocevar in #13879)
- Remove deprecated method PluggableMap#forEachLayerAtPixel ... (by @MoonE in #13868)
- Remove unused assertion numbers (by @MoonE in #13869)
- Remove deprecated Overlay options (by @MoonE in #13838)
- WebGL vector renderer for polygons, lines and points (by @jahow in #13461)
- Fix reloading tiles in case of an error with tile.load() (by @ahocevar in #13863)
- Handle multipolygons with empty polygons (by @ahocevar in #13860)
- Replace enums with typedef (by @MoonE in #13858)
- Remove deprecated label cache (by @MoonE in #13837)
- Update dev version to 7.0.0 (by @MoonE in #13850)
- Release v6.15.1 (by @openlayers in #13852)
- Recover from incorrect rebase after removal of string enums (by @ahocevar in #13835)
- Updates for the 6.15.0 release (by @openlayers in #13851)
Dependency Updates
- Bump webpack-dev-server from 4.9.3 to 4.10.0 (by @openlayers in #13986)
- Bump rollup from 2.77.2 to 2.78.0 (by @openlayers in #13985)
- Bump eslint from 8.21.0 to 8.22.0 (by @openlayers in #13987)
- Bump @babel/preset-env from 7.18.9 to 7.18.10 (by @openlayers in #13948)
- Bump @babel/core from 7.18.9 to 7.18.10 (by @openlayers in #13949)
- Bump @rollup/plugin-commonjs from 22.0.1 to 22.0.2 (by @openlayers in #13951)
- Bump puppeteer from 15.5.0 to 16.1.0 (by @openlayers in #13950)
- Bump rollup from 2.77.0 to 2.77.2 (by @openlayers in #13919)
- Bump eslint from 8.20.0 to 8.21.0 (by @openlayers in #13920)
- Bump jsdoc-plugin-typescript from 2.0.7 to 2.1.0 (by @openlayers in #13875)
- Bump puppeteer from 15.4.0 to 15.5.0 (by @openlayers in #13871)
- Bump webpack from 5.73.0 to 5.74.0 (by @openlayers in #13870)
- Bump jsdoc from 3.6.10 to 3.6.11 (by @openlayers in #13873)
- Bump terser from 5.7.2 to 5.14.2 (by @openlayers in #13859)