Merge pull request #13641 from openlayers/typo

Fix typos in upgrade notes
This commit is contained in:
Marc Jansen
2022-05-03 23:15:36 +02:00
committed by GitHub

View File

@@ -2,13 +2,13 @@
### v6.15.0
#### Fixed coordinate dimesion handling in `ol/proj`'s `addCoordinateTransforms`
#### 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
```js
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees}),
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.reverse(); },
function(coordinate) { return coordinate.reverse(); }
);
@@ -17,7 +17,7 @@ you have to change that to
```js
addCoordinateTransforms(
'EPSG:4326',
new Projection({code: 'latlong', units: 'degrees}),
new Projection({code: 'latlong', units: 'degrees'}),
function(coordinate) { return coordinate.slice(0, 2).reverse() },
function(coordinate) { return coordinate.slice(0, 2).reverse() }
);