|
|
@@ -47,11 +47,12 @@ class Api_WfsDataServer extends Api_WfsServerBase {
|
|
|
$maxFeatures = '10000';// TODO: Set Deafult Limit
|
|
|
$maxFeatures = V::get('MAXFEATURES', $maxFeatures, $_REQUEST, 'int');
|
|
|
$maxFeatures = V::get('maxFeatures', $maxFeatures, $_REQUEST, 'int');
|
|
|
+ $startIndex = V::get('startIndex', 0, $_REQUEST, 'int');// sql offset
|
|
|
$ogcFilter = V::get('Filter', '', $_REQUEST);
|
|
|
$sortBy = V::get('sortBy', '', $_REQUEST);
|
|
|
$srsname = V::get('SRSNAME', '', $_REQUEST);// eg. EPSG:4326
|
|
|
if (count($typeEx) == 2) {
|
|
|
- return $this->getFeatures($typeEx[0], $typeEx[1], $maxFeatures, $srsname, $ogcFilter, $sortBy);
|
|
|
+ return $this->getFeatures($typeEx[0], $typeEx[1], $maxFeatures, $srsname, $ogcFilter, $sortBy, $startIndex);
|
|
|
} else {
|
|
|
throw new HttpException("Wrong param TYPENAME", 400);
|
|
|
}
|
|
|
@@ -74,7 +75,7 @@ class Api_WfsDataServer extends Api_WfsServerBase {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public function getFeatures($nsPrefix, $type, $maxFeatures, $srsname, $ogcFilter = '', $sortBy = '') {
|
|
|
+ public function getFeatures($nsPrefix, $type, $maxFeatures, $srsname, $ogcFilter = '', $sortBy = '', $startIndex = 0) {
|
|
|
$DBG = (V::get('DBG_GEO', '', $_GET) > 0);// TODO: Profiler
|
|
|
$typeName = "{$nsPrefix}:{$type}";
|
|
|
$acl = $this->getAclFromTypeName($typeName);
|
|
|
@@ -97,6 +98,7 @@ class Api_WfsDataServer extends Api_WfsServerBase {
|
|
|
if($DBG){echo "ogcFilter(" . strlen($ogcFilter) . "): {$ogcFilter}\n";}
|
|
|
$searchParams = array();
|
|
|
$searchParams['limit'] = $maxFeatures;
|
|
|
+ $searchParams['limitstart'] = $startIndex;
|
|
|
if (!empty($sortBy)) {
|
|
|
$searchParams['sortBy'] = $sortBy;
|
|
|
} else {
|