move ol.Projection code and units methods to the api dir
This commit is contained in:
@@ -45,3 +45,30 @@ ol.projection = function(opt_arg){
|
||||
return proj;
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {string=} opt_code Code.
|
||||
* @return {!ol.Projection|string} Result.
|
||||
*/
|
||||
ol.Projection.prototype.code = function(opt_code){
|
||||
if (arguments.length == 1 && goog.isDef(opt_code)) {
|
||||
return this.setCode(opt_code);
|
||||
}
|
||||
else {
|
||||
return this.getCode();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {string=} opt_units Units abbreviation.
|
||||
* @return {undefined|!ol.Projection|string} Result.
|
||||
*/
|
||||
ol.Projection.prototype.units = function(opt_units){
|
||||
if (goog.isDef(opt_units)) {
|
||||
return this.setUnits(opt_units);
|
||||
}
|
||||
else {
|
||||
return this.getUnits();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,20 +50,6 @@ ol.Projection.prototype.setCode = function(code) {
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {string=} opt_code Code.
|
||||
* @return {!ol.Projection|string} Result.
|
||||
*/
|
||||
ol.Projection.prototype.code = function(opt_code){
|
||||
if (arguments.length == 1 && goog.isDef(opt_code)) {
|
||||
return this.setCode(opt_code);
|
||||
}
|
||||
else {
|
||||
return this.getCode();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string|undefined} Units abbreviation.
|
||||
*/
|
||||
@@ -98,21 +84,6 @@ ol.Projection.prototype.setExtent = function(extent) {
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {string=} opt_units Units abbreviation.
|
||||
* @return {undefined|!ol.Projection|string} Result.
|
||||
* TODO: move to api folder
|
||||
*/
|
||||
ol.Projection.prototype.units = function(opt_units){
|
||||
if (goog.isDef(opt_units)) {
|
||||
return this.setUnits(opt_units);
|
||||
}
|
||||
else {
|
||||
return this.getUnits();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Transforms is an object, with from properties, each of which may
|
||||
* have a to property. This allows you to define projections without
|
||||
|
||||
Reference in New Issue
Block a user