Mapscript draw color problem

Bart van den Eijnden BEN at SYNCERA-ITSOLUTIONS.NL
Mon Nov 21 04:45:33 EST 2005


What happens if you use the STYLE option instead?

 CLASS
   NAME "foyers"
   STYLE
      COLOR 255 0 0
      SYMBOL "carre"
      SIZE 7
      OUTLINECOLOR 0 0 0
    END
    TEMPLATE "Bidon"
  END

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Fabrice <fabrice.thevenon at CG64.FR> 11/21/2005 10:39 AM >>>
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