Permalink
Browse files

Allow paging for msQueryByFilter().

  • Loading branch information...
sdlime committed Mar 2, 2017
1 parent f8ec673 commit 761a73a5f4fcdccc5914519f786d22e24ac5a7b5
Showing with 5 additions and 2 deletions.
  1. +5 −2 mapquery.c
View
@@ -672,6 +672,7 @@ int msQueryByFilter(mapObj *map)
rectObj search_rect;
shapeObj shape;
+ int paging;
int nclasses = 0;
int *classgroup = NULL;
@@ -731,12 +732,14 @@ int msQueryByFilter(mapObj *map)
if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
}
+ paging = msLayerGetPaging(lp);
msLayerClose(lp); /* reset */
status = msLayerOpen(lp);
if(status != MS_SUCCESS) goto query_error;
+ msLayerEnablePaging(lp, paging);
/* disable driver paging */
- msLayerEnablePaging(lp, MS_FALSE);
+ // msLayerEnablePaging(lp, MS_FALSE);
old_filteritem = lp->filteritem; /* cache the existing filter/filteritem */
msInitExpression(&old_filter);
@@ -816,7 +819,7 @@ int msQueryByFilter(mapObj *map)
#endif
/* Should we skip this feature? */
- if (!msLayerGetPaging(lp) && map->query.startindex > 1) {
+ if (!paging && map->query.startindex > 1) {
--map->query.startindex;
msFreeShape(&shape);
continue;

0 comments on commit 761a73a

Please sign in to comment.