Rename projection functions for a friendlier API
The following functions are renamed: getTransform -> getTransformForProjections getTransformFromCodes -> getTransform transform -> transformWithProjections transformWithCodes -> transform With this change, the faster functions that avoid projection look-up have longer names and are used internally, whereas the slower but friendlier short name functions are available for users.
This commit is contained in:
@@ -70,8 +70,7 @@ describe('ol.Extent', function() {
|
||||
describe('transform', function() {
|
||||
|
||||
it('does transform', function() {
|
||||
var transformFn =
|
||||
ol.projection.getTransformFromCodes('EPSG:4326', 'EPSG:3857');
|
||||
var transformFn = ol.projection.getTransform('EPSG:4326', 'EPSG:3857');
|
||||
var sourceExtent = new ol.Extent(-15, -30, 45, 60);
|
||||
var destinationExtent = sourceExtent.transform(transformFn);
|
||||
expect(destinationExtent).not.toBeUndefined();
|
||||
|
||||
Reference in New Issue
Block a user