From 03700c0f0103b3549bb78ea32a7a943a1e062588 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 27 Mar 2017 09:47:03 -0600 Subject: [PATCH] Remove ol.proj dependency from EPSG3857 and EPSG4326 --- src/ol/proj/epsg3857.js | 7 +++---- src/ol/proj/epsg4326.js | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/ol/proj/epsg3857.js b/src/ol/proj/epsg3857.js index 64c97b1fe9..b6fb3b5e46 100644 --- a/src/ol/proj/epsg3857.js +++ b/src/ol/proj/epsg3857.js @@ -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.EPSG3857.PROJECTIONS = ol.proj.EPSG3857.CODES.map(function(code) { - return new ol.proj.EPSG3857_(code); + return new ol.proj.EPSG3857.Projection_(code); }); diff --git a/src/ol/proj/epsg4326.js b/src/ol/proj/epsg4326.js index 1ec287e13b..cccff1741a 100644 --- a/src/ol/proj/epsg4326.js +++ b/src/ol/proj/epsg4326.js @@ -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.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') ];