Remove ol.proj dependency from EPSG3857 and EPSG4326
This commit is contained in:
@@ -2,7 +2,6 @@ goog.provide('ol.proj.EPSG3857');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.math');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.proj.Projection');
|
||||
goog.require('ol.proj.Units');
|
||||
|
||||
@@ -16,7 +15,7 @@ goog.require('ol.proj.Units');
|
||||
* @param {string} code Code.
|
||||
* @private
|
||||
*/
|
||||
ol.proj.EPSG3857_ = function(code) {
|
||||
ol.proj.EPSG3857.Projection_ = function(code) {
|
||||
ol.proj.Projection.call(this, {
|
||||
code: code,
|
||||
units: ol.proj.Units.METERS,
|
||||
@@ -28,7 +27,7 @@ ol.proj.EPSG3857_ = function(code) {
|
||||
}
|
||||
});
|
||||
};
|
||||
ol.inherits(ol.proj.EPSG3857_, ol.proj.Projection);
|
||||
ol.inherits(ol.proj.EPSG3857.Projection_, ol.proj.Projection);
|
||||
|
||||
|
||||
/**
|
||||
@@ -85,7 +84,7 @@ ol.proj.EPSG3857.CODES = [
|
||||
* @type {Array.<ol.proj.Projection>}
|
||||
*/
|
||||
ol.proj.EPSG3857.PROJECTIONS = ol.proj.EPSG3857.CODES.map(function(code) {
|
||||
return new ol.proj.EPSG3857_(code);
|
||||
return new ol.proj.EPSG3857.Projection_(code);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
goog.provide('ol.proj.EPSG4326');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.proj');
|
||||
goog.require('ol.proj.Projection');
|
||||
goog.require('ol.proj.Units');
|
||||
goog.require('ol.sphere.WGS84');
|
||||
@@ -21,7 +20,7 @@ goog.require('ol.sphere.WGS84');
|
||||
* @param {string=} opt_axisOrientation Axis orientation.
|
||||
* @private
|
||||
*/
|
||||
ol.proj.EPSG4326_ = function(code, opt_axisOrientation) {
|
||||
ol.proj.EPSG4326.Projection_ = function(code, opt_axisOrientation) {
|
||||
ol.proj.Projection.call(this, {
|
||||
code: code,
|
||||
units: ol.proj.Units.DEGREES,
|
||||
@@ -32,7 +31,7 @@ ol.proj.EPSG4326_ = function(code, opt_axisOrientation) {
|
||||
worldExtent: ol.proj.EPSG4326.EXTENT
|
||||
});
|
||||
};
|
||||
ol.inherits(ol.proj.EPSG4326_, ol.proj.Projection);
|
||||
ol.inherits(ol.proj.EPSG4326.Projection_, ol.proj.Projection);
|
||||
|
||||
|
||||
/**
|
||||
@@ -58,12 +57,12 @@ ol.proj.EPSG4326.METERS_PER_UNIT = Math.PI * ol.sphere.WGS84.radius / 180;
|
||||
* @type {Array.<ol.proj.Projection>}
|
||||
*/
|
||||
ol.proj.EPSG4326.PROJECTIONS = [
|
||||
new ol.proj.EPSG4326_('CRS:84'),
|
||||
new ol.proj.EPSG4326_('EPSG:4326', 'neu'),
|
||||
new ol.proj.EPSG4326_('urn:ogc:def:crs:EPSG::4326', 'neu'),
|
||||
new ol.proj.EPSG4326_('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),
|
||||
new ol.proj.EPSG4326_('urn:ogc:def:crs:OGC:1.3:CRS84'),
|
||||
new ol.proj.EPSG4326_('urn:ogc:def:crs:OGC:2:84'),
|
||||
new ol.proj.EPSG4326_('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),
|
||||
new ol.proj.EPSG4326_('urn:x-ogc:def:crs:EPSG:4326', 'neu')
|
||||
new ol.proj.EPSG4326.Projection_('CRS:84'),
|
||||
new ol.proj.EPSG4326.Projection_('EPSG:4326', 'neu'),
|
||||
new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:EPSG::4326', 'neu'),
|
||||
new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),
|
||||
new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:OGC:1.3:CRS84'),
|
||||
new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:OGC:2:84'),
|
||||
new ol.proj.EPSG4326.Projection_('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),
|
||||
new ol.proj.EPSG4326.Projection_('urn:x-ogc:def:crs:EPSG:4326', 'neu')
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user