#3328 - GML3: Writing features with multiple geometries

This commit is contained in:
Andreas Watermeyer
2015-04-07 10:32:26 +02:00
parent 0789604e88
commit c530f872f9
4 changed files with 70 additions and 1 deletions
+38
View File
@@ -328,6 +328,42 @@ describe('ol.format.WFS', function() {
});
});
describe('when writing out a Transaction request', function() {
var text;
before(function(done) {
afterLoadText('spec/ol/format/wfs/TransactionUpdateMultiGeoms.xml', function(xml) {
text = xml;
done();
});
});
it('handles multiple geometries', function() {
var format = new ol.format.WFS();
var updateFeature = new ol.Feature();
updateFeature.setGeometryName('the_geom');
updateFeature.setGeometry(new ol.geom.MultiLineString([[
[-12279454, 6741885],
[-12064207, 6732101],
[-11941908, 6595126],
[-12240318, 6507071],
[-12416429, 6604910]
]]));
updateFeature.set('geom2',new ol.geom.MultiLineString([[
[-12000000, 6700000],
[-12000001, 6700001],
[-12000002, 6700002]
]]));
var serialized = format.writeTransaction([updateFeature], [], null, {
featureNS: 'http://foo',
featureType: 'FAULTS',
featurePrefix: 'foo',
gmlOptions: {srsName: 'EPSG:900913'}
});
expect(serialized).to.xmleql(ol.xml.parse(text));
});
});
describe('when writing out a Transaction request', function() {
var text;
before(function(done) {
@@ -396,6 +432,8 @@ describe('ol.format.WFS', function() {
});
});
describe('when writing out a GetFeature request', function() {
var text;
before(function(done) {