[mapserver-commits] r8647 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Mar 6 09:45:14 EST 2009


Author: assefa
Date: 2009-03-06 09:45:14 -0500 (Fri, 06 Mar 2009)
New Revision: 8647

Modified:
   trunk/mapserver/mapogcsld.c
Log:
Correct few non validating tags elements #2915

Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c	2009-03-06 12:14:49 UTC (rev 8646)
+++ trunk/mapserver/mapogcsld.c	2009-03-06 14:45:14 UTC (rev 8647)
@@ -3435,7 +3435,7 @@
                         
                         if (psLayer->type == MS_LAYER_POINT)
                         {
-                            if (psSymbol->filled)
+                            if (psSymbol->filled || bFillColor)
                             {
                                 sprintf(szTmp, "<%sFill>\n", sNameSpace);
                                 pszSLD = msStringConcatenate(pszSLD, szTmp);
@@ -3620,18 +3620,20 @@
                         psStyle->outlinecolor.blue,
                         sCssParam);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
-                sprintf(szTmp, "</%sStroke>\n", sCssParam);
+                sprintf(szTmp, "</%sStroke>\n", sNameSpace);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
                 bColorAvailable = 1;
             }
             if (!bColorAvailable)
             {       
                 /* default color */
+                sprintf(szTmp, "<%sFill>\n", sNameSpace);
+                pszSLD = msStringConcatenate(pszSLD, szTmp);
                 sprintf(szTmp, 
                         "<%s name=\"fill\">%s</%s>\n",
                         sCssParam, "#808080", sCssParam);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
-                sprintf(szTmp, "</%sFill>\n", sCssParam);
+                sprintf(szTmp, "</%sFill>\n", sNameSpace);
                 pszSLD = msStringConcatenate(pszSLD, szTmp);
             }
 
@@ -3723,8 +3725,14 @@
         pszGraphicSLD = NULL;
     }
 
-    sprintf(szHexColor,"%02x%02x%02x",psStyle->color.red,
-            psStyle->color.green,psStyle->color.blue);
+    if (psStyle->color.red != -1 && 
+        psStyle->color.green != -1 &&
+        psStyle->color.blue != -1)
+      sprintf(szHexColor,"%02x%02x%02x",psStyle->color.red,
+              psStyle->color.green,psStyle->color.blue);
+    else
+      sprintf(szHexColor,"%02x%02x%02x",psStyle->outlinecolor.red,
+              psStyle->outlinecolor.green,psStyle->outlinecolor.blue);
                             
     sprintf(szTmp, 
             "<%s name=\"stroke\">#%s</%s>\n", 



More information about the mapserver-commits mailing list