Mapscript draw color problem
Fabrice
fabrice.thevenon at CG64.FR
Mon Nov 21 01:39:16 PST 2005
Hello
I have update my code from php mapscript 3.6 to 4.6.
With 3.6 everithing was OK.
With 4.6, I have the following problem :
The points I draw dynamically are black instead of red if the outputformat
is GIF or PNG, everythings is ok with JPEG (but I don't want to use
JPEG...).
- My map only use 2 colors (the 256 colors limit should not be the pb)
The code looks like this :
***************************
...
$res=$map->selectOutputFormat('gif');
$image=$map->draw();
// $themeDessin is the layer in the mapfile used to draw
// $tabResult is an array that contains the points to draw
// this array is filled with something like $leRec=$theme->getShape(-
1,$i);
foreach ($tabResult as $eltDessin)
{
$eltDessin->draw($map,$themeDessin,$image,0,"");
$eltDessin->free();
}
$map->drawLabelCache($image);
$image_url=$image_url.$image->saveWebImage();
The mapfile looks like :
***********************
LAYER
NAME "foyers"
GROUP "Données"
DATA solidarite/foyers
STATUS ON
TRANSPARENCY 100
TYPE POINT
CLASS
NAME "foyers"
COLOR 255 0 0
SYMBOL "carre"
SIZE 7
OUTLINECOLOR 0 0 0
TEMPLATE "Bidon"
END
END
Did someone get a similar problem?
Many Thanks for any help
Fabrice
More information about the MapServer-users
mailing list