Override for clarity

This commit is contained in:
Tim Schaub
2013-06-24 12:20:34 -06:00
parent 388967d00c
commit 5a95d606f8

View File

@@ -143,15 +143,7 @@ ol.Projection.prototype.getUnits = function() {
* @return {number} Meters.
*/
ol.Projection.prototype.getMetersPerUnit = function() {
var metersPerUnit;
if (!goog.isNull(this.units_)) {
metersPerUnit = ol.METERS_PER_UNIT[this.units_];
} else {
if (this instanceof ol.Proj4jsProjection_) {
metersPerUnit = this.getProj4jsProj().to_meter;
}
}
return metersPerUnit;
return ol.METERS_PER_UNIT[this.units_];
};
@@ -231,6 +223,20 @@ ol.Proj4jsProjection_ = function(proj4jsProj, options) {
goog.inherits(ol.Proj4jsProjection_, ol.Projection);
/**
* @inheritDoc
*/
ol.Proj4jsProjection_.prototype.getMetersPerUnit = function() {
var metersPerUnit;
if (!goog.isNull(this.units_)) {
metersPerUnit = ol.METERS_PER_UNIT[this.units_];
} else {
metersPerUnit = this.getProj4jsProj().to_meter;
}
return metersPerUnit;
};
/**
* @inheritDoc
*/