Less code
Since out meters per unit conversion table is a bit spare, prefer the configured conversion.
This commit is contained in:
@@ -228,11 +228,9 @@ goog.inherits(ol.Proj4jsProjection_, ol.Projection);
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.Proj4jsProjection_.prototype.getMetersPerUnit = function() {
|
ol.Proj4jsProjection_.prototype.getMetersPerUnit = function() {
|
||||||
var metersPerUnit;
|
var metersPerUnit = this.proj4jsProj_.to_meter;
|
||||||
if (!goog.isNull(this.units_)) {
|
if (!goog.isDef(metersPerUnit)) {
|
||||||
metersPerUnit = ol.METERS_PER_UNIT[this.units_];
|
metersPerUnit = ol.METERS_PER_UNIT[this.units_];
|
||||||
} else {
|
|
||||||
metersPerUnit = this.getProj4jsProj().to_meter;
|
|
||||||
}
|
}
|
||||||
return metersPerUnit;
|
return metersPerUnit;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user