move ol.Projection code and units methods to the api dir

This commit is contained in:
Éric Lemoine
2012-06-20 10:28:54 +02:00
parent dfc35282ff
commit 4fcc00e39c
2 changed files with 27 additions and 29 deletions

View File

@@ -45,3 +45,30 @@ ol.projection = function(opt_arg){
return proj; 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();
}
};

View File

@@ -50,20 +50,6 @@ ol.Projection.prototype.setCode = function(code) {
return this; 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. * @return {string|undefined} Units abbreviation.
*/ */
@@ -98,21 +84,6 @@ ol.Projection.prototype.setExtent = function(extent) {
return this; 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 * Transforms is an object, with from properties, each of which may
* have a to property. This allows you to define projections without * have a to property. This allows you to define projections without