Read the metadata of a FeatureCollection

This commit is contained in:
Bart van den Eijnden
2014-03-07 10:32:17 +01:00
parent 2310ccdb91
commit c05e8d0292
5 changed files with 106 additions and 4 deletions

View File

@@ -33,6 +33,43 @@ describe('ol.format.WFS', function() {
});
describe('when parsing FeatureCollection', function() {
var response;
before(function(done) {
afterLoadText('spec/ol/format/wfs/NumberOfFeatures.xml',
function(xml) {
try {
response = new ol.format.WFS().readFeatureCollectionMetadata(xml);
} catch (e) {
done(e);
}
done();
});
});
it('returns the correct number of features', function() {
expect(response.numberOfFeatures).to.equal(625);
});
});
describe('when parsing FeatureCollection', function() {
var response;
before(function(done) {
afterLoadText('spec/ol/format/wfs/boundedBy.xml',
function(xml) {
try {
response = new ol.format.WFS().readFeatureCollectionMetadata(xml);
} catch (e) {
done(e);
}
done();
});
});
it('returns the correct bounds', function() {
expect(response.bounds).to.eql([3197.88, 306457.313,
280339.156, 613850.438]);
});
});
describe('when parsing TransactionResponse', function() {
var response;
before(function(done) {