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:
@@ -111,7 +111,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
||||
};
|
||||
})));
|
||||
|
||||
var transform = ol.projection.getTransform(
|
||||
var transform = ol.projection.getTransformFromProjections(
|
||||
ol.projection.get('EPSG:4326'), this.getProjection());
|
||||
var attributions = goog.array.map(
|
||||
resource.imageryProviders,
|
||||
|
||||
@@ -38,7 +38,7 @@ ol.source.Source = function(sourceOptions) {
|
||||
*/
|
||||
this.extent_ = goog.isDef(sourceOptions.extent) ?
|
||||
sourceOptions.extent : goog.isDef(sourceOptions.projection) ?
|
||||
sourceOptions.projection.getExtent() : null;
|
||||
this.projection_.getExtent() : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -1 +1 @@
|
||||
@exportSymbol ol.source.TiledWMS
|
||||
@exportSymbol ol.source.TiledWMS
|
||||
|
||||
@@ -87,8 +87,8 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function() {
|
||||
var bounds = tileJSON.bounds;
|
||||
epsg4326Extent = new ol.Extent(
|
||||
bounds[0], bounds[1], bounds[2], bounds[3]);
|
||||
extent = epsg4326Extent.transform(
|
||||
ol.projection.getTransform(epsg4326Projection, this.getProjection()));
|
||||
extent = epsg4326Extent.transform(ol.projection.getTransformFromProjections(
|
||||
epsg4326Projection, this.getProjection()));
|
||||
this.setExtent(extent);
|
||||
} else {
|
||||
epsg4326Extent = null;
|
||||
|
||||
Reference in New Issue
Block a user