[mapserver-commits] r7132 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Nov 30 23:07:37 EST 2007


Author: warmerdam
Date: 2007-11-30 23:07:36 -0500 (Fri, 30 Nov 2007)
New Revision: 7132

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapdraw.c
Log:
 Improve error reporting if a raster layer requested in a query map (#1842)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2007-11-30 22:13:28 UTC (rev 7131)
+++ trunk/mapserver/HISTORY.TXT	2007-12-01 04:07:36 UTC (rev 7132)
@@ -127,7 +127,10 @@
 - mapresample.c: Fixed support for multi-band data in RAW mode for bilinear
   and nearest neighbour resamplers (#2364).
 
+- mapdraw.c: Improve error reporting if a raster layer requested in
+  a query map (#1842).
 
+
 Version 5.0.0 (2007-09-17)
 --------------------------
 

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2007-11-30 22:13:28 UTC (rev 7131)
+++ trunk/mapserver/mapdraw.c	2007-12-01 04:07:36 UTC (rev 7132)
@@ -951,7 +951,13 @@
    return(MS_SUCCESS); /* no data associated with this layer, not an error since layer may be used as a template from MapScript */
 
   if(layer->type == MS_LAYER_QUERY || layer->type == MS_LAYER_TILEINDEX) return(MS_SUCCESS); /* query and tileindex layers simply can't be drawn, not an error */
+  
+  if( layer->type == MS_LAYER_RASTER ) {
+      msSetError( MS_QUERYERR, "Unable to draw raster layers (such as %s) as part of a query result.", "msDrawQueryLayer()", layer->name );
+      return MS_FAILURE;
+  }
 
+
   if(map->querymap.style == MS_HILITE) { /* first, draw normally, but don't return */
     status = msDrawLayer(map, layer, image);
     if(status != MS_SUCCESS) return(MS_FAILURE); /* oops */



More information about the mapserver-commits mailing list