[mapguide-commits] r5876 - in trunk/MgDev/Web/src: mapviewerphp viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 30 16:06:13 EDT 2011


Author: brucedechant
Date: 2011-05-30 13:06:12 -0700 (Mon, 30 May 2011)
New Revision: 5876

Modified:
   trunk/MgDev/Web/src/mapviewerphp/layerdefinitionfactory.php
   trunk/MgDev/Web/src/viewerfiles/arearule.templ
   trunk/MgDev/Web/src/viewerfiles/linerule.templ
Log:
Fix for trac ticket 1522 - Small extensions to the templates viewerfiles/arearule.templ and viewerfiles/linerule.templ
http://trac.osgeo.org/mapguide/ticket/1522

Notes:
- Parameterized all parameters for linerule.templ and arearule.templ


Modified: trunk/MgDev/Web/src/mapviewerphp/layerdefinitionfactory.php
===================================================================
--- trunk/MgDev/Web/src/mapviewerphp/layerdefinitionfactory.php	2011-05-30 16:21:21 UTC (rev 5875)
+++ trunk/MgDev/Web/src/mapviewerphp/layerdefinitionfactory.php	2011-05-30 20:06:12 UTC (rev 5876)
@@ -21,14 +21,20 @@
 {
     //Creates Area Rule
     //Parameters:
-    //$foreGroundColor - color code for the foreground color
     //$legendLabel - string for the legend label
     //$filterText - filter string
-    //$textSymbol - use textsymbol.templ to create it
-    static function CreateAreaRule($legendLabel, $filterText, $foreGroundColor)
+    //$fillPattern - fill pattern (ex: Solid)
+    //$foreGroundColor - color code for the foreground color
+    //$backGroundColor - color code for the background color
+    //$lineStyle - line style (ex: Solid)
+    //$lineThickness - line thickness
+    //$lineColor - color code for the line
+    //$lineUnit - line units (ex: Points)
+    //$lineSizeContext - line size context (ex: DeviceUnits)
+    static function CreateAreaRule($legendLabel, $filterText, $fillPattern, $foreGroundColor, $backGroundColor, $lineStyle, $lineThickness, $lineColor, $lineUnit, $lineSizeContext)
     {
         $areaRule = file_get_contents("../viewerfiles/arearule.templ");
-        $areaRule = sprintf($areaRule, $legendLabel, $filterText, $foreGroundColor);
+        $areaRule = sprintf($areaRule, $legendLabel, $filterText, $fillPattern, $foreGroundColor, $backGroundColor, $lineStyle, $lineThickness, $lineColor, $lineUnit, $lineSizeContext);
         return $areaRule;
     }
 
@@ -44,13 +50,17 @@
 
     //Creates line rule
     //Parameters:
-    //$color - color code for the line
     //$legendLabel - string for the legend label
     //$filter - filter string
-    static function CreateLineRule($legendLabel, $filter, $color)
+    //$lineStyle - line style (ex: Solid)
+    //$lineThickness - line thickness
+    //$lineColor - color code for the line
+    //$lineUnit - line units (ex: Points)
+    //$lineSizeContext - line size context (ex: DeviceUnits)
+    static function CreateLineRule($legendLabel, $filter, $lineStyle, $lineThickness, $lineColor, $lineUnit, $lineSizeContext)
     {
         $lineRule = file_get_contents("../viewerfiles/linerule.templ");
-        $lineRule = sprintf($lineRule, $legendLabel, $filter, $color);
+        $lineRule = sprintf($lineRule, $legendLabel, $filter, $lineStyle, $lineThickness, $lineColor, $lineUnit, $lineSizeContext);
         return $lineRule;
     }
 

Modified: trunk/MgDev/Web/src/viewerfiles/arearule.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/arearule.templ	2011-05-30 16:21:21 UTC (rev 5875)
+++ trunk/MgDev/Web/src/viewerfiles/arearule.templ	2011-05-30 20:06:12 UTC (rev 5876)
@@ -3,16 +3,16 @@
     <Filter>%s</Filter>
     <AreaSymbolization2D>
         <Fill>
-            <FillPattern>Solid</FillPattern>
+            <FillPattern>%s</FillPattern>
             <ForegroundColor>%s</ForegroundColor>
-            <BackgroundColor>FF000000</BackgroundColor>
+            <BackgroundColor>%s</BackgroundColor>
         </Fill>
         <Stroke>
-            <LineStyle>Solid</LineStyle>
-            <Thickness>1</Thickness>
-            <Color>FF000000</Color>
-            <Unit>Points</Unit>
-            <SizeContext>DeviceUnits</SizeContext>
+            <LineStyle>%s</LineStyle>
+            <Thickness>%s</Thickness>
+            <Color>%s</Color>
+            <Unit>%s</Unit>
+            <SizeContext>%s</SizeContext>
         </Stroke>
     </AreaSymbolization2D>
 </AreaRule>

Modified: trunk/MgDev/Web/src/viewerfiles/linerule.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/linerule.templ	2011-05-30 16:21:21 UTC (rev 5875)
+++ trunk/MgDev/Web/src/viewerfiles/linerule.templ	2011-05-30 20:06:12 UTC (rev 5876)
@@ -2,10 +2,10 @@
     <LegendLabel>%s</LegendLabel>
     <Filter>%s</Filter>
     <LineSymbolization2D>
-    <LineStyle>Solid</LineStyle>
-    <Thickness>1</Thickness>
+    <LineStyle>%s</LineStyle>
+    <Thickness>%s</Thickness>
     <Color>%s</Color>
-    <Unit>Points</Unit>
-    <SizeContext>DeviceUnits</SizeContext>
+    <Unit>%s</Unit>
+    <SizeContext>%s</SizeContext>
     </LineSymbolization2D>
 </LineRule>



More information about the mapguide-commits mailing list