#3328 - GML3: Writing features with multiple geometries
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user