Override for clarity
This commit is contained in:
+15
-9
@@ -143,15 +143,7 @@ ol.Projection.prototype.getUnits = function() {
|
|||||||
* @return {number} Meters.
|
* @return {number} Meters.
|
||||||
*/
|
*/
|
||||||
ol.Projection.prototype.getMetersPerUnit = function() {
|
ol.Projection.prototype.getMetersPerUnit = function() {
|
||||||
var metersPerUnit;
|
return ol.METERS_PER_UNIT[this.units_];
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -231,6 +223,20 @@ ol.Proj4jsProjection_ = function(proj4jsProj, options) {
|
|||||||
goog.inherits(ol.Proj4jsProjection_, ol.Projection);
|
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
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user