Enforces spacing around commas
This commit is contained in:
@@ -175,7 +175,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
expect(feature).to.be.an(ol.Feature);
|
||||
var geometry = feature.getGeometry();
|
||||
expect(geometry).to.be.an(ol.geom.MultiPoint);
|
||||
expect(geometry.getCoordinates()).to.eql([[102.0, 0.0] , [103.0, 1.0]]);
|
||||
expect(geometry.getCoordinates()).to.eql([[102.0, 0.0], [103.0, 1.0]]);
|
||||
expect(feature.get('prop0')).to.be('value0');
|
||||
});
|
||||
|
||||
@@ -874,7 +874,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
});
|
||||
|
||||
it('encodes multipoint', function() {
|
||||
var multipoint = new ol.geom.MultiPoint([[102.0, 0.0] , [103.0, 1.0]]);
|
||||
var multipoint = new ol.geom.MultiPoint([[102.0, 0.0], [103.0, 1.0]]);
|
||||
var esrijson = format.writeGeometry(multipoint);
|
||||
expect(multipoint.getCoordinates()).to.eql(
|
||||
format.readGeometry(esrijson).getCoordinates());
|
||||
|
||||
@@ -809,7 +809,7 @@ describe('ol.format.GeoJSON', function() {
|
||||
});
|
||||
|
||||
it('truncates transformed point with decimals option', function() {
|
||||
var point = new ol.geom.Point([2, 3]).transform('EPSG:4326','EPSG:3857');
|
||||
var point = new ol.geom.Point([2, 3]).transform('EPSG:4326', 'EPSG:3857');
|
||||
var geojson = format.writeGeometry(point, {
|
||||
featureProjection: 'EPSG:3857',
|
||||
decimals: 2
|
||||
|
||||
@@ -1175,9 +1175,9 @@ describe('ol.format.KML', function() {
|
||||
|
||||
it('can write GeometryCollection geometries', function() {
|
||||
var collection = new ol.geom.GeometryCollection([
|
||||
new ol.geom.Point([1,2]),
|
||||
new ol.geom.LineString([[1,2],[3,4]]),
|
||||
new ol.geom.Polygon([[[1,2],[3,4],[3,2],[1,2]]])
|
||||
new ol.geom.Point([1, 2]),
|
||||
new ol.geom.LineString([[1, 2], [3, 4]]),
|
||||
new ol.geom.Polygon([[[1, 2], [3, 4], [3, 2], [1, 2]]])
|
||||
]);
|
||||
var features = [new ol.Feature(collection)];
|
||||
var node = format.writeFeaturesNode(features);
|
||||
@@ -3255,7 +3255,7 @@ describe('ol.format.KML', function() {
|
||||
expect(nl[0].maxLodPixels).to.be(-1);
|
||||
expect(nl[0].minFadeExtent).to.be(0);
|
||||
expect(nl[0].maxFadeExtent).to.be(0);
|
||||
expect(nl[1].extent).to.eql([0,0,180,90]);
|
||||
expect(nl[1].extent).to.eql([0, 0, 180, 90]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -604,7 +604,7 @@ describe('ol.format.WKT', function() {
|
||||
expect(polygons[0].getLinearRings().length).to.eql(1);
|
||||
expect(polygons[1].getLinearRings().length).to.eql(2);
|
||||
expect(polygons[0].getLinearRings()[0].getCoordinates()).to.eql(
|
||||
[[40, 40 , 1], [45, 30, 2], [20, 45, 3], [40, 40, 1]]);
|
||||
[[40, 40, 1], [45, 30, 2], [20, 45, 3], [40, 40, 1]]);
|
||||
expect(polygons[1].getLinearRings()[0].getCoordinates()).to.eql(
|
||||
[[20, 35, 1], [45, 20, 2], [30, 5, 3], [10, 10, 4], [10, 30, 5], [20, 35, 1]]);
|
||||
expect(polygons[1].getLinearRings()[1].getCoordinates()).to.eql(
|
||||
@@ -644,7 +644,7 @@ describe('ol.format.WKT', function() {
|
||||
expect(polygons[0].getLinearRings().length).to.eql(1);
|
||||
expect(polygons[1].getLinearRings().length).to.eql(2);
|
||||
expect(polygons[0].getLinearRings()[0].getCoordinates()).to.eql(
|
||||
[[40, 40 , 1], [45, 30, 2], [20, 45, 3], [40, 40, 1]]);
|
||||
[[40, 40, 1], [45, 30, 2], [20, 45, 3], [40, 40, 1]]);
|
||||
expect(polygons[1].getLinearRings()[0].getCoordinates()).to.eql(
|
||||
[[20, 35, 1], [45, 20, 2], [30, 5, 3], [10, 10, 4], [10, 30, 5], [20, 35, 1]]);
|
||||
expect(polygons[1].getLinearRings()[1].getCoordinates()).to.eql(
|
||||
@@ -684,7 +684,7 @@ describe('ol.format.WKT', function() {
|
||||
expect(polygons[0].getLinearRings().length).to.eql(1);
|
||||
expect(polygons[1].getLinearRings().length).to.eql(2);
|
||||
expect(polygons[0].getLinearRings()[0].getCoordinates()).to.eql(
|
||||
[[40, 40 , 1, 0.1], [45, 30, 2, 0.1], [20, 45, 3, 0.1], [40, 40, 1, 0.1]]);
|
||||
[[40, 40, 1, 0.1], [45, 30, 2, 0.1], [20, 45, 3, 0.1], [40, 40, 1, 0.1]]);
|
||||
expect(polygons[1].getLinearRings()[0].getCoordinates()).to.eql(
|
||||
[[20, 35, 1, 0.1], [45, 20, 2, 0.1], [30, 5, 3, 0.1], [10, 10, 4, 0.1], [10, 30, 5, 0.1], [20, 35, 1, 0.1]]);
|
||||
expect(polygons[1].getLinearRings()[1].getCoordinates()).to.eql(
|
||||
|
||||
Reference in New Issue
Block a user