add support for handle attribute in Format.WFST, r=ahocevar (closes #3412)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12170 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -224,6 +224,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
attributes: {
|
||||
service: "WFS",
|
||||
version: this.version,
|
||||
handle: options && options.handle,
|
||||
outputFormat: options && options.outputFormat,
|
||||
maxFeatures: options && options.maxFeatures,
|
||||
"xsi:schemaLocation": this.schemaLocationAttr(options)
|
||||
@@ -240,15 +241,16 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
return node;
|
||||
},
|
||||
"Transaction": function(obj) {
|
||||
var options = obj && obj.options;
|
||||
var node = this.createElementNSPlus("wfs:Transaction", {
|
||||
attributes: {
|
||||
service: "WFS",
|
||||
version: this.version
|
||||
version: this.version,
|
||||
handle: options && options.handle
|
||||
}
|
||||
});
|
||||
var i, len;
|
||||
var features = obj && obj.features;
|
||||
var options = obj && obj.options;
|
||||
if(features) {
|
||||
var name, feature, geometry;
|
||||
for(i=0, len=features.length; i<len; ++i) {
|
||||
@@ -267,7 +269,10 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
}
|
||||
}
|
||||
}
|
||||
this.writeNode(name, feature, node);
|
||||
this.writeNode(name, {
|
||||
feature: feature,
|
||||
options: options
|
||||
}, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -289,15 +294,24 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
});
|
||||
return node;
|
||||
},
|
||||
"Insert": function(feature) {
|
||||
var node = this.createElementNSPlus("wfs:Insert");
|
||||
"Insert": function(obj) {
|
||||
var feature = obj.feature;
|
||||
var options = obj.options;
|
||||
var node = this.createElementNSPlus("wfs:Insert", {
|
||||
attributes: {
|
||||
handle: options && options.handle
|
||||
}
|
||||
});
|
||||
this.srsName = this.getSrsName(feature);
|
||||
this.writeNode("feature:_typeName", feature, node);
|
||||
return node;
|
||||
},
|
||||
"Update": function(feature) {
|
||||
"Update": function(obj) {
|
||||
var feature = obj.feature;
|
||||
var options = obj.options;
|
||||
var node = this.createElementNSPlus("wfs:Update", {
|
||||
attributes: {
|
||||
handle: options && options.handle,
|
||||
typeName: (this.featureNS ? this.featurePrefix + ":" : "") +
|
||||
this.featureType
|
||||
}
|
||||
@@ -355,9 +369,12 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
}
|
||||
return node;
|
||||
},
|
||||
"Delete": function(feature) {
|
||||
"Delete": function(obj) {
|
||||
var feature = obj.feature;
|
||||
var options = obj.options;
|
||||
var node = this.createElementNSPlus("wfs:Delete", {
|
||||
attributes: {
|
||||
handle: options && options.handle,
|
||||
typeName: (this.featureNS ? this.featurePrefix + ":" : "") +
|
||||
this.featureType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user