MyGit

v6.15.0

openlayers/openlayers

版本发布时间: 2022-07-19 04:32:45

openlayers/openlayers最新发布版本:v10.2.1(2024-09-27 04:27:34)

Overview

The 6.15 release brings several fixes and improvements:

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

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: https://github.com/openlayers/openlayers/compare/v6.14.1...v6.15.0

相关地址:原始地址 下载(tar) 下载(zip)

1、 v6.15.0-dist.zip 1MB

2、 v6.15.0.zip 12.95MB

查看:2022-07-19发行的版本