Merge pull request #6068 from ahocevar/geojson-write-transform

Fix GeoJSON writeGeometry tests
This commit is contained in:
Andreas Hocevar
2016-11-03 14:54:36 +01:00
committed by GitHub

View File

@@ -616,7 +616,7 @@ describe('ol.format.GeoJSON', function() {
var point = new ol.geom.Point(ol.proj.fromLonLat([10, 20]));
var geojson = format.writeGeometry(point, {featureProjection: 'EPSG:3857'});
var obj = JSON.parse(geojson);
expect(obj.coordinates).to.eql([10, 20]);
expect(obj.coordinates).to.eql(ol.proj.toLonLat(point.getCoordinates()));
});
it('respects featureProjection passed to constructor', function() {
@@ -624,7 +624,7 @@ describe('ol.format.GeoJSON', function() {
var point = new ol.geom.Point(ol.proj.fromLonLat([10, 20]));
var geojson = format.writeGeometry(point);
var obj = JSON.parse(geojson);
expect(obj.coordinates).to.eql([10, 20]);
expect(obj.coordinates).to.eql(ol.proj.toLonLat(point.getCoordinates()));
});
it('encodes linestring', function() {