WMS capabilities parsing with new extent structure

This commit is contained in:
Tim Schaub
2013-09-03 17:46:47 -06:00
parent 5d18da4035
commit 7d00159bff
5 changed files with 22 additions and 16 deletions

View File

@@ -49,8 +49,10 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1', function() {
expect(layer.title).to.eql('Manhattan (NY) roads');
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];
var bbox = [
[-74.08769307536667, 40.660618924633326],
[-73.84653192463333, 40.90178007536667]
];
expect(layer.llbbox).to.eql(bbox);
expect(layer.styles.length).to.eql(1);
expect(layer.styles[0].name).to.eql('tiger_roads');
@@ -87,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();

View File

@@ -16,8 +16,10 @@ describe('ol.parser.ogc.wmscapabilities_v1_1_1_wmsc', function() {
tilesets = obj.capability.vendorSpecific.tileSets;
tileset = tilesets[0];
expect(tilesets.length).to.eql(2);
var bbox = [-13697515.466796875, 5165920.118906248,
-13619243.94984375, 5244191.635859374];
var bbox = [
[-13697515.466796875, 5165920.118906248],
[-13619243.94984375, 5244191.635859374]
];
expect(tileset.bbox['EPSG:900913'].bbox).to.eql(bbox);
expect(tileset.format).to.eql('image/png');
expect(tileset.height).to.eql(256);

View File

@@ -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();