Skip to content

Commit 813a777

Browse files
committed
Merge pull request openlayers#1468 from drnextgis/master
Fix WFS GetFeature when featureNS is null for v1_0_0 and v2_0_0
2 parents ff28cf4 + ec4adb9 commit 813a777

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/OpenLayers/Format/WFST/v1_0_0.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(
139139
var prefix = options.featurePrefix;
140140
var node = this.createElementNSPlus("wfs:Query", {
141141
attributes: {
142-
typeName: (prefix ? prefix + ":" : "") +
142+
typeName: (options.featureNS ? prefix + ":" : "") +
143143
options.featureType
144144
}
145145
});

lib/OpenLayers/Format/WFST/v2_0_0.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ OpenLayers.Format.WFST.v2_0_0 = OpenLayers.Class(
170170
var prefix = options.featurePrefix;
171171
var node = this.createElementNSPlus("wfs:Query", {
172172
attributes: {
173-
typeNames: (prefix ? prefix + ":" : "") +
173+
typeNames: (options.featureNS ? prefix + ":" : "") +
174174
options.featureType,
175175
srsName: options.srsName
176176
}

tests/Format/WFST/v1_0_0.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
featureType: "states",
7676
featurePrefix: "topp"
7777
});
78-
var exp = "topp:states";
78+
var exp = "states";
7979
var got = format.writeNode("wfs:Query").getAttribute("typeName");
8080
t.eq(got, exp, "Query without featureNS but with featurePrefix queries for the correct featureType");
8181
}

tests/Format/WFST/v2_0_0.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
featureType: "states",
279279
featurePrefix: "topp"
280280
});
281-
var exp = "topp:states";
281+
var exp = "states";
282282
var got = format.writeNode("wfs:Query").getAttribute("typeNames");
283283
t.eq(got, exp, "Query without featureNS but with featurePrefix queries for the correct featureType");
284284
}

0 commit comments

Comments
 (0)