[OpenLayers-Commits] r11779 - in trunk/openlayers:
lib/OpenLayers/Format/WFST lib/OpenLayers/Protocol/WFS
tests/Format/WFST
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Mar 30 08:47:46 EDT 2011
Author: bartvde
Date: 2011-03-30 05:47:42 -0700 (Wed, 30 Mar 2011)
New Revision: 11779
Modified:
trunk/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js
trunk/openlayers/lib/OpenLayers/Protocol/WFS/v1.js
trunk/openlayers/tests/Format/WFST/v1_1_0.html
Log:
make use of WFS paging backported to WFS 1.1, thanks ahocevar for the improved patch, r=ahocevar (closes #3213)
Modified: trunk/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js 2011-03-30 12:40:58 UTC (rev 11778)
+++ trunk/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js 2011-03-30 12:47:42 UTC (rev 11779)
@@ -109,8 +109,10 @@
"wfs": OpenLayers.Util.applyDefaults({
"GetFeature": function(options) {
var node = OpenLayers.Format.WFST.v1.prototype.writers["wfs"]["GetFeature"].apply(this, arguments);
- options && options.resultType && this.setAttributes(node, {
- resultType: options.resultType
+ options && this.setAttributes(node, {
+ resultType: options.resultType,
+ startIndex: options.startIndex,
+ count: options.count
});
return node;
},
Modified: trunk/openlayers/lib/OpenLayers/Protocol/WFS/v1.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Protocol/WFS/v1.js 2011-03-30 12:40:58 UTC (rev 11778)
+++ trunk/openlayers/lib/OpenLayers/Protocol/WFS/v1.js 2011-03-30 12:47:42 UTC (rev 11779)
@@ -167,6 +167,16 @@
* });
* (end)
*
+ * To use a configured protocol to use WFS paging (if supported by the
+ * server), applications could do the following:
+ *
+ * (code)
+ * protocol.read({
+ * startIndex: 0,
+ * count: 50
+ * });
+ * (end)
+ *
* To limit the attributes returned by the GetFeature request, applications
* can use the propertyNames option to specify the properties to include in
* the response:
Modified: trunk/openlayers/tests/Format/WFST/v1_1_0.html
===================================================================
--- trunk/openlayers/tests/Format/WFST/v1_1_0.html 2011-03-30 12:40:58 UTC (rev 11778)
+++ trunk/openlayers/tests/Format/WFST/v1_1_0.html 2011-03-30 12:47:42 UTC (rev 11779)
@@ -75,6 +75,13 @@
resultType: "hits",
propertyNames: ["STATE_NAME", "STATE_FIPS", "STATE_ABBR"]
}
+ }, {
+ id: "getfeature1",
+ writer: "wfs:GetFeature",
+ arg: {
+ count: 10,
+ startIndex: 20
+ }
}];
t.plan(cases.length);
@@ -150,6 +157,16 @@
</wfs:Query>
</wfs:GetFeature>
--></div>
+<div id="getfeature1"><!--
+<wfs:GetFeature service="WFS" version="1.1.0" startIndex="20" count="10" xmlns:topp="http://www.openplans.org/topp"
+ xmlns:wfs="http://www.opengis.net/wfs"
+ xmlns:ogc="http://www.opengis.net/ogc"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
+ <wfs:Query xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" srsName="urn:ogc:def:crs:EPSG::4326" xmlns:topp="http://www.openplans.org/topp">
+ </wfs:Query>
+</wfs:GetFeature>
+--></div>
<div id="boundedBy"><!--
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
More information about the Commits
mailing list