Changing color of a layer php/mapscript
Bart van den Eijnden
BEN at SYNCERA-ITSOLUTIONS.NL
Tue May 17 01:53:19 PDT 2005
Hi,
FYI, in Mapserver 4.0 things were changed. A CLASS object got the possibility to have 1 or more STYLE objects (to make more advanced styling possible). Previously one would just set the COLOR of a CLASS. So STYLES is the > 4.0 way to go.
Best regards,
Bart
Bart van den Eijnden
Syncera-ITSolutions
Postbus 270
2600 AG DELFT
tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> Giridhar Manepalli <gmanepal at GMAIL.COM> 05/17/05 04:26am >>>
Thanks a lot! I got it working now. From the mapscript API, it looks
like we have to define STYLE for any color attributes and should not
embed COLOR directly into the CLASS.
But, anyway I got it!
Thanks,
Giridhar
On 5/16/05, Bart van den Eijnden <bartvde at xs4all.nl> wrote:
> Hi,
>
> you need to set the Color of the StyleObj. A StyleObj is associated with a
> ClassObj.
>
> // create a new style obj of have one ready in your MAP file
> $this->oStyle = ms_newStyleObj( $this->oClass );
> // set the color of the style object
> $this->oStyle->color->setRGB(0,0,0);
>
> Best regards,
> Bart
>
> On Sun, 15 May 2005 23:05:06 +0200, Giridhar Manepalli
> <gmanepal at GMAIL.COM> wrote:
>
> > Hello Everyone,
> > In version 4.4 of Mapserver,
> > can anyone tell me how to change the color of a layer using
> > php/mapscript? There is no variable pertaining to 'color' in the php
> > class 'classObj'. Any help in this regard is invaluable to me.
> >
> > Thanks,
> > Giridhar
> >
> >
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
More information about the MapServer-users
mailing list