Changing extent structure back to single array: [minX, minY, maxX, maxY]
This means we'll have to have a new structure and new methods for 3D envelopes.
This commit is contained in:
@@ -202,7 +202,7 @@ describe('ol.parser.GeoJSON', function() {
|
||||
var firstGeom = first.getGeometry();
|
||||
expect(firstGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(ol.extent.equals(firstGeom.getBounds(),
|
||||
[[60.52843, 29.318572], [75.158028, 38.486282]]))
|
||||
[60.52843, 29.318572, 75.158028, 38.486282]))
|
||||
.to.be(true);
|
||||
|
||||
var last = result[178];
|
||||
@@ -212,7 +212,7 @@ describe('ol.parser.GeoJSON', function() {
|
||||
var lastGeom = last.getGeometry();
|
||||
expect(lastGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(ol.extent.equals(lastGeom.getBounds(),
|
||||
[[25.264226, -22.271612], [32.849861, -15.507787]]))
|
||||
[25.264226, -22.271612, 32.849861, -15.507787]))
|
||||
.to.be(true);
|
||||
done();
|
||||
});
|
||||
@@ -251,7 +251,7 @@ describe('ol.parser.GeoJSON', function() {
|
||||
var firstGeom = first.getGeometry();
|
||||
expect(firstGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(ol.extent.equals(firstGeom.getBounds(),
|
||||
[[60.52843, 29.318572], [75.158028, 38.486282]]))
|
||||
[60.52843, 29.318572, 75.158028, 38.486282]))
|
||||
.to.be(true);
|
||||
|
||||
var last = result[178];
|
||||
@@ -260,7 +260,7 @@ describe('ol.parser.GeoJSON', function() {
|
||||
var lastGeom = last.getGeometry();
|
||||
expect(lastGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(ol.extent.equals(lastGeom.getBounds(),
|
||||
[[25.264226, -22.271612], [32.849861, -15.507787]]))
|
||||
[25.264226, -22.271612, 32.849861, -15.507787]))
|
||||
.to.be(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -204,7 +204,7 @@ describe('ol.parser.gml_v2', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/box-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.bounds).to.eql([[1, 2], [3, 4]]);
|
||||
expect(obj.bounds).to.eql([1, 2, 3, 4]);
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -212,7 +212,7 @@ describe('ol.parser.gml_v2', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/box-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.bounds).to.eql([[1, 2], [3, 4]]);
|
||||
expect(obj.bounds).to.eql([1, 2, 3, 4]);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('ol.parser.gml_v3', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/envelope.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.bounds).to.eql([[1, 2], [3, 4]]);
|
||||
expect(obj.bounds).to.eql([1, 2, 3, 4]);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -50,8 +50,8 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1', function() {
|
||||
var abstr = 'Highly simplified road layout of Manhattan in New York..';
|
||||
expect(layer['abstract']).to.eql(abstr);
|
||||
var bbox = [
|
||||
[-74.08769307536667, 40.660618924633326],
|
||||
[-73.84653192463333, 40.90178007536667]
|
||||
-74.08769307536667, 40.660618924633326,
|
||||
-73.84653192463333, 40.90178007536667
|
||||
];
|
||||
expect(layer.llbbox).to.eql(bbox);
|
||||
expect(layer.styles.length).to.eql(1);
|
||||
@@ -89,13 +89,13 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1', function() {
|
||||
expect(layers['ROADS_RIVERS'].srs).to.eql(srs);
|
||||
expect(layers['Temperature'].srs).to.eql({'EPSG:4326': true});
|
||||
var bbox = layers['ROADS_RIVERS'].bbox['EPSG:26986'];
|
||||
expect(bbox.bbox).to.eql([[189000, 834000], [285000, 962000]]);
|
||||
expect(bbox.bbox).to.eql([189000, 834000, 285000, 962000]);
|
||||
expect(bbox.res).to.eql({x: 1, y: 1});
|
||||
bbox = layers['ROADS_RIVERS'].bbox['EPSG:4326'];
|
||||
expect(bbox.bbox).to.eql([[-71.63, 41.75], [-70.78, 42.90]]);
|
||||
expect(bbox.bbox).to.eql([-71.63, 41.75, -70.78, 42.90]);
|
||||
expect(bbox.res).to.eql({x: 0.01, y: 0.01});
|
||||
bbox = layers['ROADS_1M'].bbox['EPSG:26986'];
|
||||
expect(bbox.bbox).to.eql([[189000, 834000], [285000, 962000]]);
|
||||
expect(bbox.bbox).to.eql([189000, 834000, 285000, 962000]);
|
||||
expect(bbox.res).to.eql({x: 1, y: 1});
|
||||
expect(identifiers).to.be.ok();
|
||||
expect('DIF_ID' in identifiers).to.be.ok();
|
||||
|
||||
@@ -17,8 +17,8 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1_wmsc', function() {
|
||||
tileset = tilesets[0];
|
||||
expect(tilesets.length).to.eql(2);
|
||||
var bbox = [
|
||||
[-13697515.466796875, 5165920.118906248],
|
||||
[-13619243.94984375, 5244191.635859374]
|
||||
-13697515.466796875, 5165920.118906248,
|
||||
-13619243.94984375, 5244191.635859374
|
||||
];
|
||||
expect(tileset.bbox['EPSG:900913'].bbox).to.eql(bbox);
|
||||
expect(tileset.format).to.eql('image/png');
|
||||
|
||||
@@ -53,13 +53,13 @@ describe('ol.parser.ogc.wmscapabilities_v1_3_0', function() {
|
||||
var infoFormats = ['text/xml', 'text/plain', 'text/html'];
|
||||
expect(layers['Temperature'].infoFormats).to.eql(infoFormats);
|
||||
var bbox = layers['ROADS_RIVERS'].bbox['EPSG:26986'];
|
||||
expect(bbox.bbox).to.eql([[189000, 834000], [285000, 962000]]);
|
||||
expect(bbox.bbox).to.eql([189000, 834000, 285000, 962000]);
|
||||
expect(bbox.res).to.eql({x: 1, y: 1});
|
||||
bbox = layers['ROADS_RIVERS'].bbox['CRS:84'];
|
||||
expect(bbox.bbox).to.eql([[-71.63, 41.75], [-70.78, 42.90]]);
|
||||
expect(bbox.bbox).to.eql([-71.63, 41.75, -70.78, 42.90]);
|
||||
expect(bbox.res).to.eql({x: 0.01, y: 0.01});
|
||||
bbox = layers['ROADS_1M'].bbox['EPSG:26986'];
|
||||
expect(bbox.bbox).to.eql([[189000, 834000], [285000, 962000]]);
|
||||
expect(bbox.bbox).to.eql([189000, 834000, 285000, 962000]);
|
||||
expect(bbox.res).to.eql({x: 1, y: 1});
|
||||
expect(identifiers).to.be.ok();
|
||||
expect('DIF_ID' in identifiers).to.be.ok();
|
||||
|
||||
@@ -47,8 +47,8 @@ describe('ol.parser.TopoJSON', function() {
|
||||
expect(geometry).to.be.a(ol.geom.Polygon);
|
||||
|
||||
expect(geometry.getBounds()).to.eql([
|
||||
[-70.08100810081008, 12.417091709170947],
|
||||
[-69.9009900990099, 12.608069195591469]
|
||||
-70.08100810081008, 12.417091709170947,
|
||||
-69.9009900990099, 12.608069195591469
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -88,15 +88,15 @@ describe('ol.parser.TopoJSON', function() {
|
||||
var firstGeom = first.getGeometry();
|
||||
expect(firstGeom).to.be.a(ol.geom.MultiPolygon);
|
||||
expect(firstGeom.getBounds()).to.eql(
|
||||
[[-180, -85.60903777459777], [180, 83.64513000000002]]);
|
||||
[-180, -85.60903777459777, 180, 83.64513000000002]);
|
||||
|
||||
var last = result.features[177];
|
||||
expect(last).to.be.a(ol.Feature);
|
||||
var lastGeom = last.getGeometry();
|
||||
expect(lastGeom).to.be.a(ol.geom.Polygon);
|
||||
expect(lastGeom.getBounds()).to.eql([
|
||||
[25.26325263252633, -22.271802279310577],
|
||||
[32.848528485284874, -15.50833810039586]
|
||||
25.26325263252633, -22.271802279310577,
|
||||
32.848528485284874, -15.50833810039586
|
||||
]);
|
||||
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user