[mapserver-commits] r8850 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Mar 31 17:30:03 EDT 2009


Author: assefa
Date: 2009-03-31 17:30:03 -0400 (Tue, 31 Mar 2009)
New Revision: 8850

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maplayer.c
Log:
setConnectionType(MS_WMS) doesn't work with mapscript (#2908)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-03-31 21:27:36 UTC (rev 8849)
+++ trunk/mapserver/HISTORY.TXT	2009-03-31 21:30:03 UTC (rev 8850)
@@ -12,6 +12,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- setConnectionType(MS_WMS) doesn't work with mapscript (#2908)
+
 - Perl Mapscript: improvement of imageObj wrapper (#2962)
 
 - Improve control of output resolution (RFC 55, #2948)

Modified: trunk/mapserver/maplayer.c
===================================================================
--- trunk/mapserver/maplayer.c	2009-03-31 21:27:36 UTC (rev 8849)
+++ trunk/mapserver/maplayer.c	2009-03-31 21:30:03 UTC (rev 8850)
@@ -1204,10 +1204,10 @@
     if(layer->tileindex && layer->connectiontype == MS_SHAPEFILE)
       layer->connectiontype = MS_TILED_SHAPEFILE;
 
-    if(layer->type == MS_LAYER_RASTER )
+    if(layer->type == MS_LAYER_RASTER && layer->connectiontype != MS_WMS)
       layer->connectiontype = MS_RASTER;
-    
 
+
     switch(layer->connectiontype) {
         case(MS_INLINE):
             return(msINLINELayerInitializeVirtualTable(layer));
@@ -1228,8 +1228,8 @@
             return(msPostGISLayerInitializeVirtualTable(layer));
             break;
         case(MS_WMS):
-              /* WMS isn't a public layer type, it isn't used anywhere */
-              return MS_FAILURE;
+              /* WMS should be treated as a raster layer */
+              return(msRASTERLayerInitializeVirtualTable(layer));
               break;
         case(MS_ORACLESPATIAL):
             return(msOracleSpatialLayerInitializeVirtualTable(layer));



More information about the mapserver-commits mailing list