[mapserver-users] bug in mapscript colorObj ?

Daniel Morissette dmorissette at mapgears.com
Sat Oct 1 07:45:12 PDT 2011


On 11-09-30 07:12 AM, Jachym Cepicky wrote:
> Hi,
>
> I try to set transparent color to REFERENCE map, so that the box is
> outlined-only.
>
> According to documentation, i use -1 for indication, that the color
> should be transparent
>
> color = mapscript.colorObj(-1,-1,-1)
>

How do you set/assign the color value to the reference map object? What 
if you set another color than -1,-1,-1, does it get through?

The following works fine for me in PHP MapScript. Perhaps make a similar 
test with the version of MapScript you are using (Python?), and then 
look at the output of /tmp/test.map to comfirm that the color is set as 
expected.

<?php
   $map = ms_newMapObj("/path/to/my.map");
   $map->reference->color->setRGB(-1,-1,-1);
   $map->save("/tmp/test.map");
?>

-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000




More information about the MapServer-users mailing list