Port ol.projection to new extents
This commit is contained in:
@@ -2,7 +2,6 @@ goog.provide('ol.projection.EPSG3857');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.ProjectionUnits');
|
||||
goog.require('ol.math');
|
||||
@@ -44,9 +43,10 @@ ol.projection.EPSG3857.HALF_SIZE = Math.PI * ol.projection.EPSG3857.RADIUS;
|
||||
* @const
|
||||
* @type {ol.Extent}
|
||||
*/
|
||||
ol.projection.EPSG3857.EXTENT = new ol.Extent(
|
||||
-ol.projection.EPSG3857.HALF_SIZE, -ol.projection.EPSG3857.HALF_SIZE,
|
||||
ol.projection.EPSG3857.HALF_SIZE, ol.projection.EPSG3857.HALF_SIZE);
|
||||
ol.projection.EPSG3857.EXTENT = [
|
||||
-ol.projection.EPSG3857.HALF_SIZE, ol.projection.EPSG3857.HALF_SIZE,
|
||||
-ol.projection.EPSG3857.HALF_SIZE, ol.projection.EPSG3857.HALF_SIZE
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
goog.provide('ol.projection.EPSG4326');
|
||||
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.ProjectionUnits');
|
||||
goog.require('ol.projection');
|
||||
@@ -31,7 +30,7 @@ goog.inherits(ol.projection.EPSG4326, ol.Projection);
|
||||
* @const
|
||||
* @type {ol.Extent}
|
||||
*/
|
||||
ol.projection.EPSG4326.EXTENT = new ol.Extent(-180, -90, 180, 90);
|
||||
ol.projection.EPSG4326.EXTENT = [-180, 180, -90, 90];
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -297,7 +297,7 @@ describe('ol.projection', function() {
|
||||
|
||||
describe('ol.projection.removeTransform()', function() {
|
||||
|
||||
var extent = new ol.Extent(-180, -90, 180, 90);
|
||||
var extent = [180, 180, -90, 90];
|
||||
var units = ol.ProjectionUnits.DEGREES;
|
||||
|
||||
it('removes functions cached by addTransform', function() {
|
||||
@@ -340,8 +340,7 @@ describe('ol.projection', function() {
|
||||
});
|
||||
|
||||
it('returns a configured projection', function() {
|
||||
var extent = new ol.Extent(
|
||||
485869.5728, 76443.1884, 837076.5648, 299941.7864);
|
||||
var extent = [485869.5728, 837076.5648, 76443.1884, 299941.7864];
|
||||
var epsg21781 = ol.projection.configureProj4jsProjection({
|
||||
code: 'EPSG:21781',
|
||||
extent: extent
|
||||
@@ -358,7 +357,6 @@ describe('ol.projection', function() {
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts.AssertionError');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.ProjectionUnits');
|
||||
goog.require('ol.projection');
|
||||
|
||||
Reference in New Issue
Block a user