make use of WFS paging backported to WFS 1.1, thanks ahocevar for the improved patch, r=ahocevar (closes #3213)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11779 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -109,8 +109,10 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
|
||||
"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;
|
||||
},
|
||||
|
||||
@@ -167,6 +167,16 @@ OpenLayers.Protocol.WFS.v1 = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
* });
|
||||
* (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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user