Less code

Since out meters per unit conversion table is a bit spare, prefer the configured conversion.
This commit is contained in:
Tim Schaub
2013-06-24 12:25:09 -06:00
parent 129e4d5704
commit bb915cbf3d

View File

@@ -228,11 +228,9 @@ goog.inherits(ol.Proj4jsProjection_, ol.Projection);
* @inheritDoc
*/
ol.Proj4jsProjection_.prototype.getMetersPerUnit = function() {
var metersPerUnit;
if (!goog.isNull(this.units_)) {
var metersPerUnit = this.proj4jsProj_.to_meter;
if (!goog.isDef(metersPerUnit)) {
metersPerUnit = ol.METERS_PER_UNIT[this.units_];
} else {
metersPerUnit = this.getProj4jsProj().to_meter;
}
return metersPerUnit;
};