6.5.0
With more than 110 pull requests, this release not only brings WFS 2.0 support and improved touch support for drawing geometries and querying features. In addition to that, several improvements, many bugs fixes, and nicer API docs and examples have found their way into the 6.5.0 release.
Upgrade notes
Units of the hitTolerance
option fixed
Previously, the hitTolerance
option of the map's getFeaturesAtPixel()
, forEachFeatureAtPixel()
and hasFeatureAtPixel()
methods behaved differently depending on the devicePixelRatio
(or the pixelRatio
of the map), because the original value was internally multiplied by the device pixel ratio twice instead of just once. Now this is fixed. Note: The hitTolerance
's units are css pixels. The documentation was updated to reflect this.
If your application adjusts for that with code like
{ hitTolerance: 10 / devicePixelRatio, }
you'll have to change that code to
{ hitTolerance: 10, }
New features and improvements
- New scale option in
RegularShape
andCircle
style constructors - WFS 2.0.0 support
- Added
preRender
andpostRender
methods toWebGLLayerRenderer
- Added
className
constructor option inol/layer/Heatmap
- Added load events for
ol/source/Vector
- New
iconUrlFunction
option forol/format/KML
- Added
transition
option toOSM
andCartoDB
sources DragAndDrop
interaction support for formats that read ArrayBuffer sources- New
padding
option forol/View
- New
cancel
event for theDragBox
interaction - When using
hitTolerance
, detect closest features first - Ability to draw
Circle
geometries with a custom renderer
List of all changes
- #11859 - Do not fire duplicate postrender events (@MoonE)
- #11858 - Correct documented event names for VectorSourceEvent (@MoonE)
- #11844 - Fix Style expressions error message (@MoonE)
- #11838 - Custom circle render (@changqingom)
- #11811 - Better getPointResolution default when no transform available (@mike-000)
- #11821 - Call the finishCondition when drawing points / circles (@MoonE)
- #11824 - Add Units back to API docs (@ahocevar)
- #11817 - stopPropagation support for PluggableMap (@greggian)
- #11815 - Remove unnecessary line that breaks drawing with multi-touch (@ahocevar)
- #11800 - Fix removeLastPoint when removing last point (@ahocevar)
- #11769 - Modify interaction developer experience improvements (@ahocevar)
- #11803 - Modify fix vertex insertion (@MoonE)
- #11783 - Cache hit detect indexes and check closest pixels first. (@MoonE)
- #11791 - Now that pepjs was updated, we can point to the official package (@ahocevar)
- #11790 - Fix attributions links for WMS layers from swisstopo (@openlayers)
- #11781 - Pass geometry to forEachFeatureAtPixel callback (@ahocevar)
- #11778 - No need to adjust hitTolerance for pixel ratio twice (@ahocevar)
- #11780 - Add a cancel event to the DragBox interaction (@M393)
- #11779 - Restore Mode.CIRCLE in Draw interaction (@mike-000)
- #11753 - Use Mode.LINE_STRING in Draw interaction for Circle geometries (@mike-000)
- #11767 - Improve documentation of geometry rotation (@mike-000)
- #11755 - Add padding option for View (@ahocevar)
- #11754 - Fix typo that prevents Rotate icon from indicating the view rotation (@ahocevar)
- #11719 - Clamp EPSG:3857 y to lowest/highest possible value instead of validity extent (@ahocevar)
- #11737 - Write the correct SRS code in EsriJSON (@ahocevar)
- #11749 - Document that snapTolerance must be greater than 0 (@ahocevar)
- #11750 - Update TMS tileUrlFunction example in ol/source/XYZ documentation (@mike-000)
- #11739 - Fix: Check for layer extent in CanvasLayerRenderer.getDataAtPixel (@boeckMt)
- #11748 - Add fetch and TextDecoder to polyfill list in README (@mike-000)
- #11740 - Wfs bbox per feature type (@ger-benjamin)
- #11722 - Correct meaning of 'start' and 'end' text align for LTR text (@ahocevar)
- #11741 - Include LICENSE.md in built package (@bz2)
- #11718 - Initialize sketch point on Draw#extend() (@ahocevar)
- #11732 - Replace readURI with readStyleURL for KML StyleURLs (@mike-000)
- #11723 - Drag and Drop Interaction support for formats that read ArrayBuffer sources (@mike-000)
- #11724 - Add transition option to OSM and CartoDB sources, document default (@MoonE)
- #11721 - Handle empty Z coordinates in KML (@mike-000)
- #11587 - Determine orientation by actual text start and end x (@MoonE)
- #11720 - Return to simpler and less efficient winding order algorithm (@ahocevar)
- #11715 - Add all symbols to the legacy build (@ahocevar)
- #11716 - Treat svg as binary resource (@mike-000)
- #11698 - Draw pointer improvements (@ahocevar)
- #11490 - iconUrlFunction option for ol/format/KML (@mike-000)
- #11628 - VectorSource load events (@simonseyock)
- #11691 - Use Parcel v2 in copy/paste example code (@ahocevar)
- #11673 - Do not emulate dblclick and slingleclick on multi-touch (@ahocevar)
- #11676 - Fix countries.geojson Antarctica polygon so it wraps correctly (@mike-000)
- #11646 - Ensure a unique tile key for each tile coordinate (@ahocevar)
- #11655 - Fix documentation of image render mode for vector tile layers (@ahocevar)
- #11668 - Don't try to get image data for zero sized images (@tapioko)
- #11648 - Dwithin filter (@virtualcitySYSTEMS)
- #11658 - Make webpack dev server run with current version (@MoonE)
- #11590 - Export all the Event sub class (@sbrunner)
- #11594 - Display current OS copyright date in the Raster Reprojection example (@mike-000)
- #11657 - Use https to avoid security warnings (@mike-000)
- #11649 - Deal with undefined units from proj4 longlat projections (@ahocevar)
- #11403 - #11402 add CSS class name support for control buttons (@cazacugmihai)
- #11592 - New decluttering implementation (@ahocevar)
- #11618 - Update the Marker Animation example (@mike-000)
- #11620 - Add charset to the examples html below the map (@MoonE)
- #11613 - Allow mouse input if map is rendered in an other window (@elnabo)
- #11597 - Improved performance when removing feature with only one Select (@MoonE)
- #11607 - Reset attributions control to collapsible when no uncollapsible sources are visible (@mike-000)
- #11609 - Modify interaction insert only one vertex (@M393)
- #11605 - Remove context references when releasing tiles (@ahocevar)
- #11591 - Make permalink example less complex (@kannes)
- #11569 - Fix binary data exports to codesandbox in examples (@mike-000)
- #11579 - Replace Animated GIF example globe gif (@mike-000)
- #11565 - Animated GIF example (@mike-000)
- #11571 - Replace countryflags.io with flagcdn.com in the Style Renderer example (@mike-000)
- #11568 - Fix raster source crash bug when using multiple threads (@rgroothuijsen)
- #11563 - Fix end world calculation if projection is not symmetric (@MoonE)
- #11561 - Constrain resolution when fit called without duration (@M393)
- #11559 - Only draw visible worlds (@MoonE)
- #11519 - Do not draw multipoints outside render extent (@MoonE)
- #11532 - Make TileGrid behave as documented with extent and sizes options (@ahocevar)
- #11545 - Use the className param in ol.layer.Heatmap (@fredj)
- #11548 - Bind tileUrlFunction before returning it from getTileUrlFunction (@ahocevar)
- #11549 - Only use elementFromPoint with ShadowRoot (@ahocevar)
- #11502 - Fix issue with WMS Capabilities containing a single layer (@jbelien)
- #11540 - Avoid unnecessary transform in the MVT format (@gberaudo)
- #11537 - Add rotation and rotateWithView to ol/style/Circle clone method and options (@mike-000)
- #11543 - wmts matrixset null pointer fix and improved handling of Identifier (@sweco-dkjesh)
- #11509 - Add urn:x-ogc:def:crs:EPSG:6.6:4326 as WGS84 proj identifier (@fgravin)
- #11521 - Do not use fractional pixel ratio for rendering vector tiles (@ahocevar)
- #11517 - Make clockwise check work when coordinates are duplicated (@ahocevar)
- #11501 - Empty this.canvas_ for all pixel ratios when render() is called (@mike-000)
- #11471 - Feature: added preRender and postRender methods to WebGLLayerRenderer… (@MichaelLangbein)
- #11491 - Cosmetic fix to doc (missing closing quote) (@mike-000)
- #11488 - "Layer Z-Index" example bugfix (@michalzielanski)
- #11486 - guard for null (@davidiamaf)
- #11481 - Adding original properties to cloned geometry (@michalzielanski)
- #11404 - Add security scan (@tschaub)
- #11470 - Fix pointer events polyfill link (@ahocevar)
- #11467 - Style renderer example (@ahocevar)
- #11455 - Apidoc improvements (@MoonE)
- #11474 - fix: modify rbush package import (@haasz)
- #11472 - Typescript 4.0.2 (@ahocevar)
- #11454 - VectorTile source projection has to match the view projection (@ahocevar)
- #11438 - Better scroll behaviour for apidocs (@MoonE)
- #11446 - Checks before calling handleEvent on interactions (@ahocevar)
- #11305 - PluggableMap: avoid crash when multiple interactions are removed (@megawac)
- #11433 - Fix typo in module name (@fredj)
- #11419 - WFS 2.0.0 support (@bjornharrtell)
- #11418 - Icon color default to composite operation (@MoonE)
- #11416 - Examples add labels to inputs (@MoonE)
- #11417 - Fix sort order of examples search results (@ahocevar)
- #11413 - Include scale option in RegularShape and Circle style constructors (@mike-000)
- #11401 - Ensure image extent is valid when scale is negative (@mike-000)
- #11395 - Correct inchesPerMeter and add tests for ScaleBar text (@mike-000)
- #11407 - Support deprecated coordinates element for GML3+ formats (@bjornharrtell)
- #11398 - Fix link to workshop / download (@MoonE)
- #11391 - Simplify scale calculation used for WMS getLegendUrl() (@mike-000)
Dependency Updates
- #11851 - Bump @babel/preset-env from 7.12.10 to 7.12.11 (@openlayers)
- #11850 - Bump marked from 1.2.6 to 1.2.7 (@openlayers)
- #11852 - Bump rollup from 2.35.0 to 2.35.1 (@openlayers)
- #11853 - Bump copy-webpack-plugin from 6.4.0 to 6.4.1 (@openlayers)
- #11849 - Bump eslint from 7.15.0 to 7.16.0 (@openlayers)
- #11848 - Bump ol-mapbox-style from 6.2.1 to 6.3.0 (@openlayers)
- #11828 - Bump ol-mapbox-style from 6.1.4 to 6.2.1 (@openlayers)
- #11830 - Bump jsdoc-plugin-typescript from 2.0.5 to 2.0.6 (@openlayers)
- #11829 - Bump typescript from 4.1.2 to 4.1.3 (@openlayers)
- #11833 - Bump rollup from 2.34.2 to 2.35.0 (@openlayers)
- #11834 - Bump copy-webpack-plugin from 6.3.2 to 6.4.0 (@openlayers)
- #11832 - Bump @babel/preset-env from 7.12.7 to 7.12.10 (@openlayers)
- #11835 - Bump sinon from 9.2.1 to 9.2.2 (@openlayers)
- #11831 - Bump marked from 1.2.5 to 1.2.6 (@openlayers)
- #11827 - Bump @babel/core from 7.12.9 to 7.12.10 (@openlayers)
- #11820 - [Security] Bump ini from 1.3.5 to 1.3.7 (@openlayers)
- #11809 - Bump yargs from 16.1.1 to 16.2.0 (@openlayers)
- #11808 - Bump worker-loader from 3.0.5 to 3.0.6 (@openlayers)
- #11807 - Bump eslint from 7.14.0 to 7.15.0 (@openlayers)
- #11806 - Bump rollup from 2.34.0 to 2.34.2 (@openlayers)
- #11786 - Bump rollup from 2.33.3 to 2.34.0 (@openlayers)
- #11787 - Bump babel-loader from 8.2.1 to 8.2.2 (@openlayers)
- #11785 - Bump @babel/core from 7.12.7 to 7.12.9 (@openlayers)
- #11762 - Bump typescript from 4.0.5 to 4.1.2 (@openlayers)
- #11764 - Bump copy-webpack-plugin from 6.3.1 to 6.3.2 (@openlayers)
- #11758 - Bump rollup from 2.33.2 to 2.33.3 (@openlayers)
- #11761 - Bump @babel/core from 7.12.3 to 7.12.7 (@openlayers)
- #11760 - Bump proj4 from 2.6.2 to 2.6.3 (@openlayers)
- #11763 - Bump eslint from 7.13.0 to 7.14.0 (@openlayers)
- #11759 - Bump @babel/preset-env from 7.12.1 to 7.12.7 (@openlayers)
- #11757 - Bump marked from 1.2.4 to 1.2.5 (@openlayers)
- #11756 - Bump puppeteer from 5.4.1 to 5.5.0 (@openlayers)
- #11747 - Bump rollup from 2.33.1 to 2.33.2 (@openlayers)
- #11746 - Bump babel-loader from 8.1.0 to 8.2.1 (@openlayers)
- #11745 - Bump yargs from 16.1.0 to 16.1.1 (@openlayers)
- #11744 - Bump webpack-dev-middleware from 4.0.0 to 4.0.2 (@openlayers)
- #11743 - Bump copy-webpack-plugin from 6.3.0 to 6.3.1 (@openlayers)
- #11742 - Bump marked from 1.2.3 to 1.2.4 (@openlayers)
- #11731 - Bump mocha from 8.2.0 to 8.2.1 (@openlayers)
- #11730 - Bump marked from 1.2.2 to 1.2.3 (@openlayers)
- #11729 - Bump eslint from 7.12.1 to 7.13.0 (@openlayers)
- #11728 - Bump webpack-cli from 4.1.0 to 4.2.0 (@openlayers)
- #11727 - Bump karma-firefox-launcher from 2.0.0 to 2.1.0 (@openlayers)
- #11726 - Bump copy-webpack-plugin from 6.2.1 to 6.3.0 (@openlayers)
- #11708 - Bump rollup from 2.32.1 to 2.33.1 (@openlayers)
- #11705 - Bump webpack-dev-middleware from 3.7.2 to 4.0.0 (@openlayers)
- #11706 - Bump url-polyfill from 1.1.11 to 1.1.12 (@openlayers)
- #11707 - Bump typescript from 4.0.3 to 4.0.5 (@openlayers)
- #11709 - Bump sinon from 9.2.0 to 9.2.1 (@openlayers)
- #11710 - Bump puppeteer from 5.4.0 to 5.4.1 (@openlayers)
- #11711 - Bump eslint from 7.12.0 to 7.12.1 (@openlayers)
- #11689 - Bump pngjs from 5.0.0 to 6.0.0 (@openlayers)
- #11686 - Bump shx from 0.3.2 to 0.3.3 (@openlayers)
- #11683 - Bump puppeteer from 5.3.1 to 5.4.0 (@openlayers)
- #11682 - Bump karma-firefox-launcher from 1.3.0 to 2.0.0 (@openlayers)
- #11684 - Bump marked from 1.2.0 to 1.2.2 (@openlayers)
- #11685 - Bump rollup from 2.32.0 to 2.32.1 (@openlayers)
- #11688 - Bump webpack-cli from 4.0.0 to 4.1.0 (@openlayers)
- #11687 - Bump eslint from 7.11.0 to 7.12.0 (@openlayers)
- #11666 - Bump worker-loader from 3.0.4 to 3.0.5 (@openlayers)
- #11665 - Bump url-polyfill from 1.1.10 to 1.1.11 (@openlayers)
- #11664 - Bump @babel/core from 7.11.6 to 7.12.3 (@openlayers)
- #11663 - Bump yargs from 16.0.3 to 16.1.0 (@openlayers)
- #11662 - Bump mocha from 8.1.3 to 8.2.0 (@openlayers)
- #11661 - Bump rollup from 2.29.0 to 2.32.0 (@openlayers)
- #11660 - Bump @babel/preset-env from 7.11.5 to 7.12.1 (@openlayers)
- #11643 - Bump terser-webpack-plugin from 4.2.2 to 4.2.3 (@openlayers)
- #11645 - Bump webpack-cli from 3.3.12 to 4.0.0 (@openlayers)
- #11644 - Bump copy-webpack-plugin from 6.2.0 to 6.2.1 (@openlayers)
- #11642 - Bump sinon from 9.1.0 to 9.2.0 (@openlayers)
- #11641 - Bump rollup from 2.28.2 to 2.29.0 (@openlayers)
- #11640 - Bump worker-loader from 3.0.3 to 3.0.4 (@openlayers)
- #11639 - Bump eslint from 7.10.0 to 7.11.0 (@openlayers)
- #11622 - Bump sinon from 9.0.3 to 9.1.0 (@openlayers)
- #11623 - Bump copy-webpack-plugin from 6.1.1 to 6.2.0 (@openlayers)
- #11603 - Bump rollup from 2.28.1 to 2.28.2 (@openlayers)
- #11602 - Bump marked from 1.1.1 to 1.2.0 (@openlayers)
- #11601 - Bump puppeteer from 5.3.0 to 5.3.1 (@openlayers)
- #11600 - Bump eslint from 7.9.0 to 7.10.0 (@openlayers)
- #11599 - Bump worker-loader from 3.0.2 to 3.0.3 (@openlayers)
- #11598 - Bump karma from 5.2.2 to 5.2.3 (@openlayers)
- #11578 - Bump rollup from 2.26.11 to 2.28.1 (@openlayers)
- #11576 - Bump terser-webpack-plugin from 4.2.0 to 4.2.2 (@openlayers)
- #11575 - Bump typescript from 4.0.2 to 4.0.3 (@openlayers)
- #11577 - Bump copy-webpack-plugin from 6.1.0 to 6.1.1 (@openlayers)
- #11574 - Bump jsdoc from 3.6.5 to 3.6.6 (@openlayers)
- #11573 - Bump webpack from 4.44.1 to 4.44.2 (@openlayers)
- #11558 - Bump yargs from 15.4.1 to 16.0.3 (@openlayers)
- #11557 - Bump eslint from 7.8.1 to 7.9.0 (@openlayers)
- #11556 - Bump puppeteer from 5.2.1 to 5.3.0 (@openlayers)
- #11555 - Bump karma from 5.2.1 to 5.2.2 (@openlayers)
- #11554 - Bump terser-webpack-plugin from 4.1.0 to 4.2.0 (@openlayers)
- #11553 - Bump rollup from 2.26.10 to 2.26.11 (@openlayers)
- #11531 - Bump rollup from 2.26.8 to 2.26.10 (@openlayers)
- #11530 - Bump @babel/preset-env from 7.11.0 to 7.11.5 (@openlayers)
- #11529 - Bump rollup-plugin-terser from 7.0.1 to 7.0.2 (@openlayers)
- #11528 - Bump @babel/core from 7.11.4 to 7.11.6 (@openlayers)
- #11526 - Bump eslint from 7.7.0 to 7.8.1 (@openlayers)
- #11527 - Bump karma from 5.1.1 to 5.2.1 (@openlayers)
- #11525 - Bump copy-webpack-plugin from 6.0.4 to 6.1.0 (@openlayers)
- #11515 - [Security] Bump http-proxy from 1.17.0 to 1.18.1 (@openlayers)
- #11504 - [Security] Bump bl from 4.0.2 to 4.0.3 (@openlayers)
- #11496 - Bump mocha from 8.1.1 to 8.1.3 (@openlayers)
- #11495 - Bump rollup-plugin-terser from 7.0.0 to 7.0.1 (@openlayers)
- #11494 - Bump copy-webpack-plugin from 6.0.3 to 6.0.4 (@openlayers)
- #11493 - Bump rollup from 2.26.5 to 2.26.8 (@openlayers)
- #11462 - Bump rollup from 2.26.3 to 2.26.5 (@openlayers)
- #11460 - Bump karma-sourcemap-loader from 0.3.7 to 0.3.8 (@openlayers)
- #11459 - Bump ol-mapbox-style from 6.1.3 to 6.1.4 (@openlayers)
- #11458 - Bump worker-loader from 3.0.1 to 3.0.2 (@openlayers)
- #11457 - Bump @babel/core from 7.11.1 to 7.11.4 (@openlayers)
- #11443 - Bump eslint from 7.6.0 to 7.7.0 (@openlayers)
- #11441 - Bump terser-webpack-plugin from 4.0.0 to 4.1.0 (@openlayers)
- #11440 - Bump rollup from 2.23.1 to 2.26.3 (@openlayers)
- #11439 - Bump sinon from 9.0.2 to 9.0.3 (@openlayers)
- #11442 - Bump ol-mapbox-style from 6.1.2 to 6.1.3 (@openlayers)
- #11426 - Bump @babel/core from 7.11.0 to 7.11.1 (@openlayers)
- #11425 - Bump rollup from 2.23.0 to 2.23.1 (@openlayers)
- #11424 - Bump rollup-plugin-terser from 6.1.0 to 7.0.0 (@openlayers)
- #11423 - Bump worker-loader from 3.0.0 to 3.0.1 (@openlayers)
- #11422 - Bump terser-webpack-plugin from 3.0.8 to 4.0.0 (@openlayers)
- #11421 - Bump mocha from 8.1.0 to 8.1.1 (@openlayers)