Set the background color

Dylan Keon dbkeon.ml at GMAIL.COM
Mon Jan 23 15:54:53 PST 2006


On 01/23/2006 02:53 PM, krishna S wrote:
> Hello all, i want to set the background color, boundary color using a php
> mapscript function/method, but i couldnt find anyhelp full method which
> sets the background color and the boundary color. Could anyone please help
> me out in this ....

Do you mean for a layer?  This is the general procedure:

$layer = $map->getLayerByName('layer_name'); //$map is map object
$class = $layer->getClass(0); //0 is first class in layer
$style = ms_newStyleObj($class);
$style->color->setRGB(220,220,220); //background color
$style->outlinecolor->setRGB(255,255,0); //boundary color

--Dylan



More information about the MapServer-users mailing list