npm ol 6.6.0

latest releases: 7.3.1-dev.1678058258888, 7.3.1-dev.1677975735802, 7.3.0...
2 years ago

With more than 160 pull requests from 14 contributors, this release brings improved support for using OpenLayers in Node.js environments, a new WKB (well known binary) format, TypeScript declarations in the ol package, and more efficient vector tile rendering. In addition, several examples were added or improved, and many bugs were fixed.

Upgrade notes

Included TypeScript declarations

The ol package now includes TypeScript declarations as *.d.ts files.

If desired, e.g. when you don't want to adjust your code after upgrading from a previous version where you used @types/ol, you can opt out of the included types and use third-party types by specifying aliases in the compilerOptions section of tsconfig.json, e.g.

    "baseUrl": "./",
    "paths": {
      "ol": ["node_modules/@types/ol"],
      "ol/*": ["node_modules/@types/ol/*"]
    },

Deprecation of undefinedHTML option for the MousePosition control

The undefinedHTML option for the MousePosition control has been deprecated and will be removed in a future release. Use the new placeholder option instead.

New placeholder option for the MousePosition control

When the mouse position is not available, the control renders a non-breaking space. To render something else instead,
set the placeholder option. If you want to retain the last position when the mouse leaves the viewport, set
placeholder: false. This will be the default behavior in a future release.

The placeholder option has no effect if the deprecated undefinedHTML option is also used. You should use the placeholder option instead of undefinedHTML.

Deprecation of image render mode for vector tile layers

renderMode: 'image' for vector tile layers has been deprecated. Applications continue to work, but a warning will be issued to the console. To get rid of the warning, simply remove the renderMode option.

New features and improvements

  • New create-ol-app package to create a new app with an OpenLayers map.
  • Improved rendering quality of regular shapes and circles.
  • New placeholder option for better control of the MousePosition control's output.
  • TypeScript generated .d.ts files are now included in the ol package.
  • Improved zDirection option on tile sources to control when the tile z changes on fractional zoom levels.
  • Template mode for the TileDebug source for better debugging of tile coordinate issues.
  • More efficient vector tile rendering to save battery on mobile devices and memory.
  • New 'properties' option on layers for easier use of arbitrary properties in typed environments.
  • Hit detection support when using OffscreenCanvas and workers for rendering.
  • The ol package now uses "type": "module" in package.json for easier use of OpenLayers in Node.js.
  • New WKB (Well-Known Binary) format parser and serializer.
  • Console warning when map container's width or height are zero.
  • New snapToPointer option on the Modify interaction to control user experience when clicking a vertex far away from its center.

List of all changes

Dependency Updates

Don't miss a new ol release

NewReleases is sending notifications on new releases.