Skip to content

Commit 761a73a

Browse files
committed
Allow paging for msQueryByFilter().
1 parent f8ec673 commit 761a73a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: mapquery.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ int msQueryByFilter(mapObj *map)
672672
rectObj search_rect;
673673

674674
shapeObj shape;
675+
int paging;
675676

676677
int nclasses = 0;
677678
int *classgroup = NULL;
@@ -731,12 +732,14 @@ int msQueryByFilter(mapObj *map)
731732
if((lp->mingeowidth > 0) && ((map->extent.maxx - map->extent.minx) < lp->mingeowidth)) continue;
732733
}
733734

735+
paging = msLayerGetPaging(lp);
734736
msLayerClose(lp); /* reset */
735737
status = msLayerOpen(lp);
736738
if(status != MS_SUCCESS) goto query_error;
739+
msLayerEnablePaging(lp, paging);
737740

738741
/* disable driver paging */
739-
msLayerEnablePaging(lp, MS_FALSE);
742+
// msLayerEnablePaging(lp, MS_FALSE);
740743

741744
old_filteritem = lp->filteritem; /* cache the existing filter/filteritem */
742745
msInitExpression(&old_filter);
@@ -816,7 +819,7 @@ int msQueryByFilter(mapObj *map)
816819
#endif
817820

818821
/* Should we skip this feature? */
819-
if (!msLayerGetPaging(lp) && map->query.startindex > 1) {
822+
if (!paging && map->query.startindex > 1) {
820823
--map->query.startindex;
821824
msFreeShape(&shape);
822825
continue;

0 commit comments

Comments
 (0)