[mapserver-commits] r10112 - in trunk/mapserver: . mapscript/php mapscript/swiginc

svn at osgeo.org svn at osgeo.org
Sat Apr 24 12:54:03 EDT 2010


Author: sdlime
Date: 2010-04-24 12:54:02 -0400 (Sat, 24 Apr 2010)
New Revision: 10112

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapquery.c
   trunk/mapserver/mapscript/php/mapscript_i.c
   trunk/mapserver/mapscript/swiginc/layer.i
   trunk/mapserver/mapserv.c
Log:
Fixed attribute queries to use an extent stored (and cached) as part of the queryObj rather than the map->extent. (#3424)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-04-23 18:35:30 UTC (rev 10111)
+++ trunk/mapserver/HISTORY.TXT	2010-04-24 16:54:02 UTC (rev 10112)
@@ -14,6 +14,9 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed attribute queries to use an extent stored (and cached) as part of the queryObj
+  rather than the map->extent. (#3424)
+
 - Reverted msLayerWhichItems() to 5.4-like behavior although still supporting
   retrieving all items (#3356,#3342)
 

Modified: trunk/mapserver/mapquery.c
===================================================================
--- trunk/mapserver/mapquery.c	2010-04-23 18:35:30 UTC (rev 10111)
+++ trunk/mapserver/mapquery.c	2010-04-24 16:54:02 UTC (rev 10112)
@@ -503,7 +503,7 @@
   }
 
   /* identify candidate shapes */
-  searchrect = map->extent;
+  searchrect = map->query.rect;
 #ifdef USE_PROJ  
   if(lp->project && msProjectionsDiffer(&(lp->projection), &(map->projection)))  
     msProjectRect(&(map->projection), &(lp->projection), &searchrect); /* project the searchrect to source coords */

Modified: trunk/mapserver/mapscript/php/mapscript_i.c
===================================================================
--- trunk/mapserver/mapscript/php/mapscript_i.c	2010-04-23 18:35:30 UTC (rev 10111)
+++ trunk/mapserver/mapscript/php/mapscript_i.c	2010-04-24 16:54:02 UTC (rev 10112)
@@ -527,7 +527,8 @@
     if(qitem) map->query.item = strdup(qitem);
     if(qstring) map->query.str = strdup(qstring);
     map->query.layer = self->index;
-        
+    map->query.rect = map->extent;        
+
     status = self->status;
     self->status = MS_ON;
     retval = msQueryByAttributes(map);

Modified: trunk/mapserver/mapscript/swiginc/layer.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/layer.i	2010-04-23 18:35:30 UTC (rev 10111)
+++ trunk/mapserver/mapscript/swiginc/layer.i	2010-04-24 16:54:02 UTC (rev 10112)
@@ -281,6 +281,7 @@
         if(qitem) map->query.item = strdup(qitem);
         if(qstring) map->query.str = strdup(qstring);
         map->query.layer = self->index;
+        map->query.rect = map->extent;
 
         status = self->status;
         self->status = MS_ON;

Modified: trunk/mapserver/mapserv.c
===================================================================
--- trunk/mapserver/mapserv.c	2010-04-23 18:35:30 UTC (rev 10111)
+++ trunk/mapserver/mapserv.c	2010-04-24 16:54:02 UTC (rev 10112)
@@ -1554,6 +1554,8 @@
           if(QueryItem) mapserv->map->query.item = strdup(QueryItem);
           if(QueryString) mapserv->map->query.str = strdup(QueryString);
 
+          mapserv->map->query.rect = mapserv->map->extent;
+
           mapserv->map->query.mode = MS_QUERY_MULTIPLE;
           if(mapserv->Mode == ITEMFEATUREQUERY || mapserv->Mode == ITEMFEATUREQUERYMAP)
             mapserv->map->query.mode = MS_QUERY_SINGLE;
@@ -1646,6 +1648,8 @@
           if(QueryItem) mapserv->map->query.item = strdup(QueryItem);
           if(QueryString) mapserv->map->query.str = strdup(QueryString);
 
+	  mapserv->map->query.rect = mapserv->map->extent;
+
 	  mapserv->map->query.mode = MS_QUERY_MULTIPLE;
           if(mapserv->Mode == ITEMQUERY || mapserv->Mode == ITEMQUERYMAP) mapserv->map->query.mode = MS_QUERY_SINGLE;
           break;



More information about the mapserver-commits mailing list