making Protocol.WFS work with just featureType and featurePrefix configured. r=bartvde (closes #3368)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12129 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-06-29 09:53:37 +00:00
parent 058008864e
commit eb7cc04254
12 changed files with 148 additions and 12 deletions

View File

@@ -136,9 +136,10 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(
srsName: this.srsName,
srsNameInQuery: this.srsNameInQuery
}, options);
var prefix = options.featurePrefix;
var node = this.createElementNSPlus("wfs:Query", {
attributes: {
typeName: (options.featureNS ? options.featurePrefix + ":" : "") +
typeName: (prefix ? prefix + ":" : "") +
options.featureType
}
});
@@ -146,7 +147,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(
node.setAttribute("srsName", options.srsName);
}
if(options.featureNS) {
node.setAttribute("xmlns:" + options.featurePrefix, options.featureNS);
node.setAttribute("xmlns:" + prefix, options.featureNS);
}
if(options.propertyNames) {
for(var i=0,len = options.propertyNames.length; i<len; i++) {