Add a worldExtent to ol.proj.Projection
This commit is contained in:
committed by
Andreas Hocevar
parent
9de010c791
commit
9f19569144
@@ -86,6 +86,13 @@ ol.proj.Projection = function(options) {
|
||||
*/
|
||||
this.extent_ = goog.isDef(options.extent) ? options.extent : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Extent}
|
||||
*/
|
||||
this.worldExtent_ = goog.isDef(options.worldExtent) ?
|
||||
options.worldExtent : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
@@ -148,6 +155,16 @@ ol.proj.Projection.prototype.getMetersPerUnit = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the world extent for this projection.
|
||||
* @return {ol.Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
ol.proj.Projection.prototype.getWorldExtent = function() {
|
||||
return this.worldExtent_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the axis orientation of this projection.
|
||||
* Example values are:
|
||||
@@ -198,6 +215,17 @@ ol.proj.Projection.prototype.setExtent = function(extent) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Set the world extent for this projection.
|
||||
* @param {ol.Extent} worldExtent World extent
|
||||
* [minlon, minlat, maxlon, maxlat].
|
||||
* @api
|
||||
*/
|
||||
ol.proj.Projection.prototype.setWorldExtent = function(worldExtent) {
|
||||
this.worldExtent_ = worldExtent;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the resolution of the point in degrees. For projections with degrees as
|
||||
* the unit this will simply return the provided resolution. For other
|
||||
|
||||
Reference in New Issue
Block a user