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:
Tim Schaub
2013-09-15 00:15:24 -06:00
parent de0e8aeced
commit e806f51b3d
63 changed files with 379 additions and 392 deletions
+2 -2
View File
@@ -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();
});
});
+1 -1
View File
@@ -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();