[fusion-commits] r1437 - sandbox/legendImage/MapServer/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Jul 7 14:11:20 EDT 2008


Author: Assefa
Date: 2008-07-07 14:11:20 -0400 (Mon, 07 Jul 2008)
New Revision: 1437

Modified:
   sandbox/legendImage/MapServer/php/LoadMap.php
Log:
Force legend drawing to use GD

Modified: sandbox/legendImage/MapServer/php/LoadMap.php
===================================================================
--- sandbox/legendImage/MapServer/php/LoadMap.php	2008-07-04 21:59:42 UTC (rev 1436)
+++ sandbox/legendImage/MapServer/php/LoadMap.php	2008-07-07 18:11:20 UTC (rev 1437)
@@ -257,6 +257,17 @@
          //sort them
          sort($aScaleBreaks);
 
+         /*special case to force the the legend icons to be drawn using a gd driver
+           This is only necessary until ticket http://trac.osgeo.org/mapserver/ticket/2682 
+           get applied.
+           Note that we do not check the outputformat of the map (assuming that we are 
+           using GD or AGG renderers)
+          */
+         $nVersion = ms_GetVersionInt();
+         if ($nVersion <= 50200) /*5.2 and before*/
+           $oMap->selectOutputFormat("png24");
+         
+         
          //create scale ranges for each pair of breaks
          for ($j=0; $j<count($aScaleBreaks)-1; $j++) {
              $scaleRange = NULL;



More information about the fusion-commits mailing list