[mapserver-users] can't set class obj's color in php
    Daniel Morissette 
    morissette at dmsolutions.ca
       
    Mon Jun 10 20:30:00 PDT 2002
    
    
  
Pushkar Pradhan wrote:
> 
> I am stuck, not able to set a class obj's color in mapscript,
> code:
>    for($c = 0; $c < count($tmp->numclasses); $c++) {
>       echo "class index $c";
>       $cl1 = $tmp->getClass($c);
>       $cl1->set("color", "255 0 0");
>    }
> 
The 'color' class member in MapScript is a color index... so try this:
   
  $cl1->set("color", $map->addColor(255, 0, 0));
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.
    
    
More information about the MapServer-users
mailing list