make WFS protocol and format more robust, r=ahocevar (closes #2237)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9636 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -119,7 +119,9 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
data = data.documentElement;
|
data = data.documentElement;
|
||||||
}
|
}
|
||||||
var obj = {};
|
var obj = {};
|
||||||
|
if(data) {
|
||||||
this.readNode(data, obj);
|
this.readNode(data, obj);
|
||||||
|
}
|
||||||
if(obj.features) {
|
if(obj.features) {
|
||||||
obj = obj.features;
|
obj = obj.features;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ OpenLayers.Protocol.WFS.v1 = OpenLayers.Class(OpenLayers.Protocol, {
|
|||||||
schema: this.schema
|
schema: this.schema
|
||||||
}, this.formatOptions));
|
}, this.formatOptions));
|
||||||
}
|
}
|
||||||
if(!this.featureNS) {
|
if(!this.featureNS && this.featurePrefix) {
|
||||||
// featureNS autodetection
|
// featureNS autodetection
|
||||||
var readNode = this.format.readNode;
|
var readNode = this.format.readNode;
|
||||||
this.format.readNode = function(node, obj) {
|
this.format.readNode = function(node, obj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user