Add configureProj4jsProjection function
so that we can add extent and global parameter to proj4js projections. And remove setExtent method which is not relevant.
This commit is contained in:
@@ -17,3 +17,4 @@
|
||||
@exportSymbol ol.projection.getTransformFromCodes
|
||||
@exportSymbol ol.projection.transform
|
||||
@exportSymbol ol.projection.transformWithCodes
|
||||
@exportSymbol ol.projection.configureProj4jsProjection
|
||||
|
||||
@@ -107,14 +107,6 @@ ol.Projection.prototype.getExtent = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Extent} extent Extent.
|
||||
*/
|
||||
ol.Projection.prototype.setExtent = function(extent) {
|
||||
this.extent_ = extent;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {ol.Coordinate} point Point.
|
||||
@@ -663,3 +655,14 @@ ol.projection.transformWithCodes =
|
||||
vertex = transformFn(vertex, vertex, 2);
|
||||
return new ol.Coordinate(vertex[0], vertex[1]);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Proj4jsProjectionOptions} options Projection config options.
|
||||
* @return {ol.Proj4jsProjection_} Proj4js projection.
|
||||
*/
|
||||
ol.projection.configureProj4jsProjection = function(options) {
|
||||
goog.asserts.assert(!goog.object.containsKey(
|
||||
ol.projection.proj4jsProjections_, options.code));
|
||||
return ol.projection.getProj4jsProjectionFromCode_(options);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user