[mapserver-commits] r10756 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Nov 22 09:09:16 EST 2010


Author: assefa
Date: 2010-11-22 06:09:16 -0800 (Mon, 22 Nov 2010)
New Revision: 10756

Modified:
   trunk/mapserver/mapkmlrenderer.cpp
Log:
correct use of color parameter

Modified: trunk/mapserver/mapkmlrenderer.cpp
===================================================================
--- trunk/mapserver/mapkmlrenderer.cpp	2010-11-22 08:58:59 UTC (rev 10755)
+++ trunk/mapserver/mapkmlrenderer.cpp	2010-11-22 14:09:16 UTC (rev 10756)
@@ -314,7 +314,7 @@
            Items[i] = strdup(layer->items[i]);
      }
 
-    
+    
 
     setupRenderingParams(&layer->metadata);
     return MS_SUCCESS;
@@ -808,7 +808,7 @@
     }
 }
 
-char* KmlRenderer::lookupSymbolUrl(imageObj *img, symbolObj *symbol, symbolStyleObj *style)
+char* KmlRenderer::lookupSymbolUrl(imageObj *img, symbolObj *symbol, symbolStyleObj *symstyle)
 {
     char	symbolHexColor[32];
 	/*	
@@ -824,9 +824,9 @@
                 </Style>
 	*/
 
-    sprintf(symbolHexColor,"%02x%02x%02x%02x", style->color->alpha, style->color->blue,
-            style->color->green, style->color->red);
-    snprintf(SymbolName, sizeof(SymbolName), "symbol_%s_%.1f_%s", symbol->name, style->scale, symbolHexColor);
+    sprintf(symbolHexColor,"%02x%02x%02x%02x", symstyle->style->color.alpha, symstyle->style->color.blue,
+            symstyle->style->color.green, symstyle->style->color.red);
+    snprintf(SymbolName, sizeof(SymbolName), "symbol_%s_%.1f_%s", symbol->name, symstyle->scale, symbolHexColor);
 
     char *symbolUrl = msLookupHashTable(StyleHashTable, SymbolName);
     if (!symbolUrl)
@@ -842,10 +842,10 @@
       }
       else
       {
-        sprintf(iconFileName, "symbol_%s_%.1f.%s", symbol->name, style->scale, "png");
+        sprintf(iconFileName, "symbol_%s_%.1f.%s", symbol->name, symstyle->scale, "png");
       }
 
-      if (createIconImage(iconFileName, symbol, style) != MS_SUCCESS)
+      if (createIconImage(iconFileName, symbol, symstyle) != MS_SUCCESS)
       {
         char errMsg[512];
         sprintf(errMsg, "Error creating icon file '%s'", iconFileName);
@@ -854,7 +854,7 @@
       }
 
       if (img->imageurl)
-        sprintf(iconUrl, "%s%s.%s", img->imageurl, msGetBasename(iconFileName), "png");
+        sprintf(iconUrl, "%s%s.%s", img->imageurl, msGetBasename(iconFileName), "png");
       else
         snprintf(iconUrl, sizeof(iconUrl), "%s", iconFileName);
 



More information about the mapserver-commits mailing list