[mapserver-commits] r11026 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sun Feb 27 13:44:41 EST 2011


Author: sdlime
Date: 2011-02-27 10:44:41 -0800 (Sun, 27 Feb 2011)
New Revision: 11026

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maptemplate.c
Log:
Allow definition of nodata attribute for layers without results (via resultset tag). (#3701)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-02-26 23:00:57 UTC (rev 11025)
+++ trunk/mapserver/HISTORY.TXT	2011-02-27 18:44:41 UTC (rev 11026)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Allow definition of nodata attribute for layers without results (via resultset tag). (#3701)
+
 - mapprojhack.c: restructure to avoid needing projects, or any internal 
   knowledge of PROJ.4.  
 

Modified: trunk/mapserver/maptemplate.c
===================================================================
--- trunk/mapserver/maptemplate.c	2011-02-26 23:00:57 UTC (rev 11025)
+++ trunk/mapserver/maptemplate.c	2011-02-27 18:44:41 UTC (rev 11026)
@@ -982,6 +982,7 @@
   hashTableObj *tagArgs=NULL;
 
   char *layerName=NULL;
+  char *nodata=NULL;
 
   int layerIndex=-1;
   layerObj *lp;
@@ -1003,6 +1004,7 @@
     if(getTagArgs("resultset", tagStart, &tagArgs) != MS_SUCCESS) return(MS_FAILURE);
     if(tagArgs) {
       layerName = msLookupHashTable(tagArgs, "layer");
+      nodata = msLookupHashTable(tagArgs, "nodata");
     }
 
     if(!layerName) {
@@ -1054,6 +1056,8 @@
       if(processFeatureTag(mapserv, &tag, lp) != MS_SUCCESS)
         return(MS_FAILURE); /* TODO: how to handle */ 
       *line = msStringConcatenate(*line, tag);
+    } else if(nodata) {
+      *line = msStringConcatenate(*line, nodata);
     }
 
     *line = msStringConcatenate(*line, postTag);



More information about the mapserver-commits mailing list