Check for proj4 in a way that also works in module environments

This commit is contained in:
Andreas Hocevar
2014-07-10 20:23:33 +02:00
parent 512c2032ed
commit 1d26c1faaf

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(goog.global.proj4)) {
typeof proj4 == 'function') {
var def = proj4.defs(code);
if (goog.isDef(def)) {
var units = def.units;