Safeguard against cases where no projection and no proj4 is available

This commit is contained in:
Andreas Hocevar
2014-07-10 18:32:29 +02:00
parent ea7c32ff6e
commit 19757ae3e0

View File

@@ -468,7 +468,7 @@ ol.proj.get = function(projectionLike) {
var projections = ol.proj.projections_;
projection = projections[code];
if (ol.ENABLE_PROJ4JS && !goog.isDef(projection) &&
goog.isFunction(proj4)) {
goog.isFunction(goog.global.proj4)) {
var def = proj4.defs(code);
if (goog.isDef(def)) {
var units = def.units;