npm ol 6.15.0
v6.15.0

latest releases: 7.3.1-dev.1678058258888, 7.3.1-dev.1677975735802, 7.3.0...
23 months ago

Overview

The 6.15 release brings several fixes and improvements:

  • Faster vector tile rendering for soures with non-standard tile grids
  • Reduced canvas memory footprint for increased stability on iOS devices and better rendering performance
  • Fixed a bug that prevented tiles from expiring from the tile cache in the correct order
  • Better type safety with an increasing number of null checks and union types
  • New setFill and setStroke methods for RegularShape symbols
  • Vector symbol and text decluttering on the style level
  • Fixed pointer event handling on touch devices when layer visibility changes
  • New justify option for text styles
  • New Link interation for adding center, zoom, rotation and active layers to the URL
  • Easier css styling of the scale bar, and in addition to minWidth, the scale line can now also be configured with a maxWidth

Details

Deprecated tilePixelRatio option for data tile sources.

If you were previously trying to scale data tiles using the tilePixelRatio property for data tile sources (this is rare), you should now use the explicit tileSize and tileGrid properties. The source's tileSize represents the source tile dimensions and the tile grid's tileSize represents the desired rendered dimensions.

const source = new DataTileSource({
  tileSize: [512, 512], // source tile size
  tileGrid: createXYZ({tileSize: [256, 256]}), // rendered tile size
});

Fixed coordinate dimension handling in ol/proj's addCoordinateTransforms

The forward and inverse functions passed to addCooordinateTransforms now receive a coordinate with all dimensions of the original coordinate, not just two. If you previosly had coordinates with more than two dimensions and added a transform like

addCoordinateTransforms(
    'EPSG:4326',
    new Projection({code: 'latlong', units: 'degrees'}),
    function(coordinate) { return coordinate.reverse(); },
    function(coordinate) { return coordinate.reverse(); }
);

you have to change that to

addCoordinateTransforms(
    'EPSG:4326',
    new Projection({code: 'latlong', units: 'degrees'}),
    function(coordinate) { return coordinate.slice(0, 2).reverse() },
    function(coordinate) { return coordinate.slice(0, 2).reverse() }
);

Replacement of string enums with union types

This change only affects users that were using the non-API string enums

  • ol/OverlayPositioning
  • ol/extent/Corner
  • ol/format/FormatType
  • ol/geom/GeometryType
  • ol/source/State
  • ol/source/WMSServerType
  • ol/source/WMTSRequestEncoding

Instead of these, use the respective strings, which are now typesafe by means of union types.

List of all changes

See below for a complete list of features and fixes.

Dependency Updates

New Contributors

Full Changelog: v6.14.1...v6.15.0

Don't miss a new ol release

NewReleases is sending notifications on new releases.