Named exports from ol/proj
This commit is contained in:
committed by
Andreas Hocevar
parent
fab77e8d37
commit
6f72ffe498
@@ -8,7 +8,7 @@ import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import _ol_geom_Point_ from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_proj_ from '../../../../src/ol/proj.js';
|
||||
import {get as getProjection, transform} from '../../../../src/ol/proj.js';
|
||||
|
||||
|
||||
describe('ol.format.EsriJSON', function() {
|
||||
@@ -239,7 +239,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
expect(feature[0].getGeometry()).to.be.an(_ol_geom_Point_);
|
||||
expect(feature[0].getGeometry().getCoordinates()).to.eql(
|
||||
_ol_proj_.transform([102.0, 0.5], 'EPSG:4326', 'EPSG:3857'));
|
||||
transform([102.0, 0.5], 'EPSG:4326', 'EPSG:3857'));
|
||||
});
|
||||
|
||||
it('can read and transform a feature collection', function() {
|
||||
@@ -249,18 +249,18 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
expect(features[0].getGeometry()).to.be.an(_ol_geom_Point_);
|
||||
expect(features[0].getGeometry().getCoordinates()).to.eql(
|
||||
_ol_proj_.transform([102.0, 0.5], 'EPSG:4326', 'EPSG:3857'));
|
||||
transform([102.0, 0.5], 'EPSG:4326', 'EPSG:3857'));
|
||||
expect(features[1].getGeometry().getCoordinates()).to.eql([
|
||||
_ol_proj_.transform([102.0, 0.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
_ol_proj_.transform([103.0, 1.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
_ol_proj_.transform([104.0, 0.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
_ol_proj_.transform([105.0, 1.0], 'EPSG:4326', 'EPSG:3857')
|
||||
transform([102.0, 0.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
transform([103.0, 1.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
transform([104.0, 0.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
transform([105.0, 1.0], 'EPSG:4326', 'EPSG:3857')
|
||||
]);
|
||||
expect(features[2].getGeometry().getCoordinates()).to.eql([[
|
||||
_ol_proj_.transform([100.0, 0.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
_ol_proj_.transform([100.0, 1.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
_ol_proj_.transform([101.0, 1.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
_ol_proj_.transform([101.0, 0.0], 'EPSG:4326', 'EPSG:3857')
|
||||
transform([100.0, 0.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
transform([100.0, 1.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
transform([101.0, 1.0], 'EPSG:4326', 'EPSG:3857'),
|
||||
transform([101.0, 0.0], 'EPSG:4326', 'EPSG:3857')
|
||||
]]);
|
||||
});
|
||||
|
||||
@@ -753,7 +753,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
expect(second.get('bam')).to.be('baz');
|
||||
expect(second.getGeometry()).to.be.a(_ol_geom_LineString_);
|
||||
|
||||
expect(format.readProjection(json)).to.be(_ol_proj_.get('EPSG:3857'));
|
||||
expect(format.readProjection(json)).to.be(getProjection('EPSG:3857'));
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user