|
@@ -241,6 +241,18 @@ class Api_WfsDataServer extends Api_WfsServerBase {
|
|
|
$xmlWriter->writeAttribute('numberMatched', 'unknown'); // TODO: return total items if simple query (without prefix, small total number, maxFeatures set, etc.)
|
|
$xmlWriter->writeAttribute('numberMatched', 'unknown'); // TODO: return total items if simple query (without prefix, small total number, maxFeatures set, etc.)
|
|
|
// NOTE: for client: if numberMatched == 'unknown' then request with resultType = 'hits'
|
|
// NOTE: for client: if numberMatched == 'unknown' then request with resultType = 'hits'
|
|
|
$xmlWriter->writeAttribute('numberReturned', count($items));
|
|
$xmlWriter->writeAttribute('numberReturned', count($items));
|
|
|
|
|
+ if ($searchParams['limit'] > 0) {
|
|
|
|
|
+ $xmlWriter->writeAttribute('next', Request::merge(Request::getUrl(), [ 'startIndex' => $searchParams['limitstart'] + $searchParams['limit'] ]));
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($searchParams['limit'] > 0 && $searchParams['limitstart'] >= $searchParams['limit']) {
|
|
|
|
|
+ $xmlWriter->writeAttribute('previous', Request::merge(Request::getUrl(), [ 'startIndex' => $searchParams['limitstart'] - $searchParams['limit'] ]));
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($searchParams['limit'] > 0 && $searchParams['limitstart'] > 0 && $searchParams['limitstart'] < $searchParams['limit']) {
|
|
|
|
|
+ $xmlWriter->writeAttribute('previous', Request::merge(Request::getUrl(), [
|
|
|
|
|
+ 'startIndex' => 0,
|
|
|
|
|
+ 'maxFeatures' => $searchParams['limitstart']
|
|
|
|
|
+ ]));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
$tblName = $acl->getName();
|
|
$tblName = $acl->getName();
|
|
|
$primaryKeyField = $acl->getPrimaryKeyField();
|
|
$primaryKeyField = $acl->getPrimaryKeyField();
|