Remove ENABLE_PROJ4JS
This commit is contained in:
@@ -11,13 +11,6 @@ import webgl from './webgl.js';
|
||||
export var DEFAULT_WMS_VERSION = '1.3.0';
|
||||
|
||||
|
||||
/**
|
||||
* @type {boolean} Enable integration with the Proj4js library. Default is
|
||||
* `true`.
|
||||
*/
|
||||
export var ENABLE_PROJ4JS = true;
|
||||
|
||||
|
||||
/**
|
||||
* @type {boolean} Enable automatic reprojection of raster sources. Default is
|
||||
* `true`.
|
||||
@@ -143,7 +136,6 @@ export default {
|
||||
inherits: inherits,
|
||||
VERSION: VERSION,
|
||||
DEFAULT_WMS_VERSION: DEFAULT_WMS_VERSION,
|
||||
ENABLE_PROJ4JS: ENABLE_PROJ4JS,
|
||||
ENABLE_RASTER_REPROJECTION: ENABLE_RASTER_REPROJECTION,
|
||||
DEBUG_WEBGL: DEBUG_WEBGL,
|
||||
HAS_WEBGL: HAS_WEBGL,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @module ol/proj
|
||||
*/
|
||||
import {ENABLE_PROJ4JS} from './index.js';
|
||||
import _ol_Sphere_ from './Sphere.js';
|
||||
import _ol_extent_ from './extent.js';
|
||||
import _ol_math_ from './math.js';
|
||||
@@ -32,7 +31,6 @@ _ol_proj_.METERS_PER_UNIT = _ol_proj_Units_.METERS_PER_UNIT;
|
||||
_ol_proj_.SPHERE_ = new _ol_Sphere_(_ol_Sphere_.DEFAULT_RADIUS);
|
||||
|
||||
|
||||
if (ENABLE_PROJ4JS) {
|
||||
/**
|
||||
* Register proj4. If not explicitly registered, it will be assumed that
|
||||
* proj4js will be loaded in the global namespace. For example in a
|
||||
@@ -48,7 +46,6 @@ if (ENABLE_PROJ4JS) {
|
||||
_ol_proj_.setProj4 = function(proj4) {
|
||||
_ol_proj_proj4_.set(proj4);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -311,7 +308,7 @@ _ol_proj_.get = function(projectionLike) {
|
||||
} else if (typeof projectionLike === 'string') {
|
||||
var code = projectionLike;
|
||||
projection = _ol_proj_projections_.get(code);
|
||||
if (ENABLE_PROJ4JS && !projection) {
|
||||
if (!projection) {
|
||||
var proj4js = _ol_proj_proj4_.get();
|
||||
if (typeof proj4js == 'function' &&
|
||||
proj4js.defs(code) !== undefined) {
|
||||
@@ -380,7 +377,7 @@ _ol_proj_.getTransformFromProjections = function(sourceProjection, destinationPr
|
||||
var sourceCode = sourceProjection.getCode();
|
||||
var destinationCode = destinationProjection.getCode();
|
||||
var transform = _ol_proj_transforms_.get(sourceCode, destinationCode);
|
||||
if (ENABLE_PROJ4JS && !transform) {
|
||||
if (!transform) {
|
||||
var proj4js = _ol_proj_proj4_.get();
|
||||
if (typeof proj4js == 'function') {
|
||||
var sourceDef = proj4js.defs(sourceCode);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @module ol/proj/Projection
|
||||
*/
|
||||
import {ENABLE_PROJ4JS} from '../index.js';
|
||||
import _ol_proj_Units_ from '../proj/Units.js';
|
||||
import _ol_proj_proj4_ from '../proj/proj4.js';
|
||||
|
||||
@@ -108,7 +107,6 @@ var _ol_proj_Projection_ = function(options) {
|
||||
this.metersPerUnit_ = options.metersPerUnit;
|
||||
|
||||
var code = options.code;
|
||||
if (ENABLE_PROJ4JS) {
|
||||
var proj4js = _ol_proj_proj4_.get();
|
||||
if (typeof proj4js == 'function') {
|
||||
var def = proj4js.defs(code);
|
||||
@@ -124,7 +122,6 @@ var _ol_proj_Projection_ = function(options) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user