Do not overwrite projections in the registry
This commit is contained in:
@@ -141,8 +141,10 @@ ol.proj.Projection = function(options) {
|
||||
*/
|
||||
this.defaultTileGrid_ = null;
|
||||
|
||||
if (ol.ENABLE_PROJ4JS && typeof proj4 == 'function') {
|
||||
var code = options.code;
|
||||
var projections = ol.proj.projections_;
|
||||
var code = options.code;
|
||||
if (ol.ENABLE_PROJ4JS && typeof proj4 == 'function' &&
|
||||
!goog.isDef(projections[code])) {
|
||||
var def = proj4.defs(code);
|
||||
if (goog.isDef(def)) {
|
||||
if (goog.isDef(def.axis) && !goog.isDef(options.axisOrientation)) {
|
||||
@@ -158,7 +160,6 @@ ol.proj.Projection = function(options) {
|
||||
}
|
||||
this.units_ = units;
|
||||
}
|
||||
var projections = ol.proj.projections_;
|
||||
var currentCode, currentDef, currentProj, proj4Transform;
|
||||
for (currentCode in projections) {
|
||||
currentDef = proj4.defs(currentCode);
|
||||
|
||||
Reference in New Issue
Block a user