[mapserver-commits] r9587 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Dec 7 11:10:14 EST 2009


Author: assefa
Date: 2009-12-07 11:10:12 -0500 (Mon, 07 Dec 2009)
New Revision: 9587

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapwms.c
Log:
 WMS GetFeatureInfo should respect the scale like GetMap does (#842)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-12-07 14:47:32 UTC (rev 9586)
+++ trunk/mapserver/HISTORY.TXT	2009-12-07 16:10:12 UTC (rev 9587)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- WMS GetFeatureInfo should respect the scale like GetMap does (#842)
+
 - Filter encoding: simple filters using propertyislike not applied properly
   #2720, #2840
 

Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c	2009-12-07 14:47:32 UTC (rev 9586)
+++ trunk/mapserver/mapwms.c	2009-12-07 16:10:12 UTC (rev 9587)
@@ -2825,17 +2825,18 @@
         return msWMSException(map, nVersion, "LayerNotDefined");
       }
 
+      
+        
       for(j=0; j<map->numlayers; j++) {
         /* Force all layers OFF by default */
 	GET_LAYER(map, j)->status = MS_OFF;
-
         for(k=0; k<numlayers; k++) {
           if ((GET_LAYER(map, j)->name && strcasecmp(GET_LAYER(map, j)->name, layers[k]) == 0) ||
               (map->name && strcasecmp(map->name, layers[k]) == 0) ||
               (GET_LAYER(map, j)->group && strcasecmp(GET_LAYER(map, j)->group, layers[k]) == 0))
             {
-              GET_LAYER(map, j)->status = MS_ON;
-              numlayers_found++;
+                numlayers_found++;     
+                GET_LAYER(map, j)->status = MS_ON;               
             }
         }
       }
@@ -2883,6 +2884,9 @@
 /*      check if all layers selected are queryable. If not send an      */
 /*      exception.                                                      */
 /* -------------------------------------------------------------------- */
+  /*make sure to initialize the map scale so that layers that are scale dependent are resepected for 
+    the query*/ 
+  msCalculateScale(map->extent,map->units,map->width,map->height, map->resolution, &map->scaledenom);
   for (i=0; i<map->numlayers; i++)
   {
       if (GET_LAYER(map, i)->status == MS_ON && !msIsLayerQueryable(GET_LAYER(map, i)))



More information about the mapserver-commits mailing list