add support for WFS hit count (1.1) in WFST Format, r=ahocevar (closes #2131)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10268 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -33,6 +33,12 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
|
||||
* Constructor: OpenLayers.Format.WFST.v1_1_0
|
||||
* A class for parsing and generating WFS v1.1.0 transactions.
|
||||
*
|
||||
* To read additional information like hit count (numberOfFeatures) from
|
||||
* the FeatureCollection, call the <OpenLayers.Format.WFST.v1.read> method
|
||||
* with {output: "object"} as 2nd argument. Note that it is possible to
|
||||
* just request the hit count from a WFS 1.1.0 server with the
|
||||
* resultType="hits" request parameter.
|
||||
*
|
||||
* Parameters:
|
||||
* options - {Object} Optional object whose properties will be set on the
|
||||
* instance.
|
||||
@@ -59,6 +65,12 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
|
||||
*/
|
||||
readers: {
|
||||
"wfs": OpenLayers.Util.applyDefaults({
|
||||
"FeatureCollection": function(node, obj) {
|
||||
obj.numberOfFeatures = parseInt(node.getAttribute(
|
||||
"numberOfFeatures"));
|
||||
OpenLayers.Format.WFST.v1.prototype.readers["wfs"]["FeatureCollection"].apply(
|
||||
this, arguments);
|
||||
},
|
||||
"TransactionResponse": function(node, obj) {
|
||||
obj.insertIds = [];
|
||||
obj.success = false;
|
||||
|
||||
Reference in New Issue
Block a user