Allow multiple featureTypes through ol.format.WFS as well

This commit is contained in:
Bart van den Eijnden
2014-12-27 19:12:57 +01:00
parent d0180f35e0
commit b05ead4056
4 changed files with 48 additions and 5 deletions

View File

@@ -448,6 +448,49 @@ describe('ol.format.WFS', function() {
});
describe('when parsing multiple feature types', function() {
var features;
before(function(done) {
afterLoadText('spec/ol/format/gml/multiple-typenames.xml', function(xml) {
try {
features = new ol.format.WFS({
featureNS: 'http://localhost:8080/official',
featureType: ['planet_osm_polygon', 'planet_osm_line']
}).readFeatures(xml);
} catch (e) {
done(e);
}
done();
});
});
it('reads all features', function() {
expect(features.length).to.be(12);
});
});
describe('when parsing multiple feature types', function() {
var features;
before(function(done) {
afterLoadText('spec/ol/format/gml/multiple-typenames.xml', function(xml) {
try {
features = new ol.format.WFS().readFeatures(xml);
} catch (e) {
done(e);
}
done();
});
});
it('reads all features with autoconfigure', function() {
expect(features.length).to.be(12);
});
});
});