Merge pull request #2330 from ahocevar/proj4-global

Safeguard against cases where no projection and no proj4 is available
This commit is contained in:
Andreas Hocevar
2014-07-10 18:53:26 +02:00

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;