Add and use new proj4.register function
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
* @module ol/proj/Projection
|
||||
*/
|
||||
import _ol_proj_Units_ from '../proj/Units.js';
|
||||
import _ol_proj_proj4_ from '../proj/proj4.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -105,23 +104,6 @@ var _ol_proj_Projection_ = function(options) {
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
this.metersPerUnit_ = options.metersPerUnit;
|
||||
|
||||
var code = options.code;
|
||||
var proj4js = _ol_proj_proj4_.get();
|
||||
if (typeof proj4js == 'function') {
|
||||
var def = proj4js.defs(code);
|
||||
if (def !== undefined) {
|
||||
if (def.axis !== undefined && options.axisOrientation === undefined) {
|
||||
this.axisOrientation_ = def.axis;
|
||||
}
|
||||
if (options.metersPerUnit === undefined) {
|
||||
this.metersPerUnit_ = def.to_meter;
|
||||
}
|
||||
if (options.units === undefined) {
|
||||
this.units_ = def.units;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user