[Mapserver-users] can I use different symbols in thesamedynamiclayer?

Daniel Morissette morissette at dmsolutions.ca
Tue Sep 30 09:17:06 EDT 2003


Frieso ter Haseborg wrote:
> 
> The answer remains: $class->color is obsolete, but I think the correct
> proof has to look like this:
> $color=$class->color;
> $color->setRGB ( 0, 255, 0 );	// this raises: "Fatal error: Call to a
> member function on a non-object in ..."
> $class->color=$color;
> 

You're correct, in MapServer 4.0, $class->color is gone.  If any 
documentation for 4.0 still refers to it then please let us know so that 
it can be fixed.

The color is now a member of the styleObj, so you would do something 
like this:

   $style = $class->getStyle(0);
   $style->color->setRGB(0, 255, 0);

BTW, you'll find lots of useful info about 3.6/4.0 changes in 
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MigrationGuide

-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-users mailing list