[mapserver-commits] r9649 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Sat Jan 2 12:21:10 EST 2010


Author: sdlime
Date: 2010-01-02 12:21:10 -0500 (Sat, 02 Jan 2010)
New Revision: 9649

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapserv.c
Log:
Fixed problems with point queries not working via the CGI (mode=query or mode=nquery) (#3246)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-01-02 17:19:45 UTC (rev 9648)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-01-02 17:21:10 UTC (rev 9649)
@@ -15,6 +15,7 @@
 Current Version (SVN branch-5-6):
 --------------------------------
 
+- Fixed problems with point queries not working via the CGI (mode=query or mode=nquery) (#3246)
 
 Version 5.6.0 (2009-12-18):
 ---------------------------

Modified: branches/branch-5-6/mapserver/mapserv.c
===================================================================
--- branches/branch-5-6/mapserver/mapserv.c	2010-01-02 17:19:45 UTC (rev 9648)
+++ branches/branch-5-6/mapserver/mapserv.c	2010-01-02 17:21:10 UTC (rev 9649)
@@ -1671,14 +1671,14 @@
               mapserv->map->cellsize = msAdjustExtent(&(mapserv->map->extent), mapserv->map->width, mapserv->map->height);
               if((status = msCalculateScale(mapserv->map->extent, mapserv->map->units, mapserv->map->width, mapserv->map->height, mapserv->map->resolution, &mapserv->map->scaledenom)) != MS_SUCCESS) writeError();
               mapserv->map->query.rect = mapserv->map->extent;
-	      mapserv->map->query.mode = MS_QUERY_BY_RECT; 
+	      mapserv->map->query.type = MS_QUERY_BY_RECT; 
             } else {
               mapserv->map->extent = mapserv->ImgExt; /* use the existing image parameters */
               mapserv->map->width = mapserv->ImgCols;
               mapserv->map->height = mapserv->ImgRows;
               if((status = msCalculateScale(mapserv->map->extent, mapserv->map->units, mapserv->map->width, mapserv->map->height, mapserv->map->resolution, &mapserv->map->scaledenom)) != MS_SUCCESS) writeError();     
               mapserv->map->query.point = mapserv->mappnt;
-              mapserv->map->query.mode = MS_QUERY_BY_POINT;
+              mapserv->map->query.type = MS_QUERY_BY_POINT;
             }
 
             break;      
@@ -1725,8 +1725,8 @@
             mapserv->map->query.type = MS_QUERY_BY_SHAPE;
             break;      
           case FROMUSERPNT:
-            if(mapserv->Buffer == 0) { /* why == 0, makes no sense */
-	      mapserv->map->query.rect = mapserv->map->extent;
+            if(mapserv->Buffer == 0) { /* do a *pure* point query */
+	      mapserv->map->query.point = mapserv->mappnt;
               mapserv->map->query.type = MS_QUERY_BY_POINT;
               setExtent(mapserv);
             } else {



More information about the mapserver-commits mailing list