[mapserver-commits] r9190 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Jul 20 14:23:49 EDT 2009


Author: aboudreault
Date: 2009-07-20 14:23:49 -0400 (Mon, 20 Jul 2009)
New Revision: 9190

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maptemplate.c
Log:
Fixed template processor to respect layer order. (#2619)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-07-20 14:14:59 UTC (rev 9189)
+++ trunk/mapserver/HISTORY.TXT	2009-07-20 18:23:49 UTC (rev 9190)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed template processor to respect layer order. (#2619)
+
 - Add MS_DEBUGLEVEL and MS_ERRORFILE commandline switches for mapserv.c. 
 
 - Exposed msMapOffsetExtent, msMapScaleExtent and msMapSetCenter methods in PHP/Mapscript (#2460)

Modified: trunk/mapserver/maptemplate.c
===================================================================
--- trunk/mapserver/maptemplate.c	2009-07-20 14:14:59 UTC (rev 9189)
+++ trunk/mapserver/maptemplate.c	2009-07-20 18:23:49 UTC (rev 9190)
@@ -3702,8 +3702,8 @@
   }
 
   mapserv->RN = 1; /* overall result number */
-  for(i=(mapserv->map->numlayers-1); i>=0; i--) {
-    mapserv->resultlayer = lp = (GET_LAYER(mapserv->map, i));
+  for(i=0; i<mapserv->map->numlayers; i++) {
+    mapserv->resultlayer = lp = (GET_LAYER(mapserv->map, mapserv->map->layerorder[i]));
 
     if(!lp->resultcache) continue;
     if(lp->resultcache->numresults <= 0) continue;



More information about the mapserver-commits mailing list