[Mapserver-users] How to set class' color by code.
Krung Saengpole
krung at cad.go.th
Sun Sep 7 12:30:41 PDT 2003
Vinko,
Thank you for your help. My problem's solved.
Krung.
>> I want to set the class' color by code using PHPMapscript/PHP4.3.2 on Windows XP but have no luck. I didn't find any members or methods of ClassObj to set its color. Can I do this? (Not set color of LABEL in CLASS) e.g.
>>
>> $class=ms_newClassObj($layer);
>> $class->....# how to set class color
>
>I guess you're using MapServer 4.0.
>
>There's a new StyleObj that manages the colors and symbols of a class.
>
>So, now you have the ClassObj that has an instance of a LabelObj and an
>instance of a StyleObj (or more than one).
>
>$class = ms_newClassObj($layer);
>$style = ms_newStyleObj($class);
>$style->color->setRGB(0,0,0); // New method for adding colors
>
>BTW, what's the use of having more than one style per class?
>
>--
>Vinko Vrsalovic <el[|- at -|]vinko.cl>
>http://www.cprsig.cl
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
More information about the MapServer-users
mailing list