[mapserver-commits] r9225 - in trunk/mapserver: . mapscript/php3 mapscript/swiginc

svn at osgeo.org svn at osgeo.org
Sun Jul 26 07:05:14 EDT 2009


Author: tamas
Date: 2009-07-26 07:05:14 -0400 (Sun, 26 Jul 2009)
New Revision: 9225

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapfile.c
   trunk/mapserver/mapscript/php3/mapscript_i.c
   trunk/mapserver/mapscript/swiginc/layer.i
Log:
Fixed the shape index for the inline layers (#3074)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-07-26 11:01:47 UTC (rev 9224)
+++ trunk/mapserver/HISTORY.TXT	2009-07-26 11:05:14 UTC (rev 9225)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed the shape index for the inline layers (#3074)
+
 - Fixed MINDISTANCE not considering label size on lines (#3050)
 
 - Labeling enhancements: ability to repeat labels along a line/multiline (#3030)

Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c	2009-07-26 11:01:47 UTC (rev 9224)
+++ trunk/mapserver/mapfile.c	2009-07-26 11:05:14 UTC (rev 9225)
@@ -675,10 +675,12 @@
       msSetError(MS_EOFERR, NULL, "loadFeature()");      
       return(MS_FAILURE);
     case(END):
-      if (player->features == NULL) shape->index = 0;
-      else shape->index = player->features->shape.index + 1;
+      if(player->features != NULL && player->features->tailifhead != NULL) 
+            shape->index = player->features->tailifhead->shape.index + 1;
+        else 
+            shape->index = 0;
       if((node = insertFeatureList(list, shape)) == NULL) 
-	status = MS_FAILURE;
+	  status = MS_FAILURE;
 
       msFreeShape(shape); /* clean up */
       msFree(shape);

Modified: trunk/mapserver/mapscript/php3/mapscript_i.c
===================================================================
--- trunk/mapserver/mapscript/php3/mapscript_i.c	2009-07-26 11:01:47 UTC (rev 9224)
+++ trunk/mapserver/mapscript/php3/mapscript_i.c	2009-07-26 11:05:14 UTC (rev 9225)
@@ -572,8 +572,10 @@
   }
 
 int layerObj_addFeature(layerObj *self, shapeObj *shape) {
-    if (self->features == NULL) shape->index = 0;
-    else shape->index = self->features->shape.index + 1;
+    if(self->features != NULL && self->features->tailifhead != NULL) 
+          shape->index = self->features->tailifhead->shape.index + 1;
+      else 
+          shape->index = 0;
     if(insertFeatureList(&(self->features), shape) == NULL) 
       return -1;
     else

Modified: trunk/mapserver/mapscript/swiginc/layer.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/layer.i	2009-07-26 11:01:47 UTC (rev 9224)
+++ trunk/mapserver/mapscript/swiginc/layer.i	2009-07-26 11:05:14 UTC (rev 9225)
@@ -381,8 +381,10 @@
     int addFeature(shapeObj *shape) 
     {    
         self->connectiontype = MS_INLINE;
-        if (self->features == NULL) shape->index = 0;
-        else shape->index = self->features->shape.index + 1;
+        if(self->features != NULL && self->features->tailifhead != NULL) 
+            shape->index = self->features->tailifhead->shape.index + 1;
+        else 
+            shape->index = 0;
         if (insertFeatureList(&(self->features), shape) == NULL) 
         return MS_FAILURE;
         return MS_SUCCESS;



More information about the mapserver-commits mailing list