[Mapserver-users] PHP mapscript, pointObj->draw, transparency problem

Daniel Morissette morissette at dmsolutions.ca
Thu May 22 11:32:37 EDT 2003


Fabrice,

I've run into that before as well.  Transparency works only between
layers when you use the $map->draw() method.  It won't work with
$layer->draw() or with $point->draw(), $shape->draw(), etc.

Daniel



Thevenon Fabrice wrote:
> 
> Hello All !
> 
> My mapfile describes a map with a layer of points that are drawn
> with a truetype symbol and transparency.
> (I draw circles as the top layer, with transparency to see what
> is below the circles).
> So far, everything is OK, the points appear with transparency.
> 
> I would like to add dynamically some other transparent points to
> my map with mapscript.
> I'm using php mapscript 3.6.2.
> 
> I use the following code :
> 
> $map=ms_newMapObj($path_mapfile);
> ...
> $image=$map->draw();
> ...
> $myLayer=$map->getLayerByName("theTransparentLayerName"); #This transparent
> layer comes from the mapfile
> $myPoint=ms_newPointObj();
> $myPoint->setXY($x,$y);
> $myPoint->draw($map, $myLayer, $image, 0, ""); #class 0 renders trnsparent
> in the map file
> 
> The point is drawn with the parameters expected for the class 0,
> (size, color, ...) except that it is NOT transparent...
> 
> How could I do to add dynamically transparent points to my map?
> 
> Many thanks for any help!
> 
> Fabrice THEVENON
> Ingénieur SIG - Informatique
> Conseil Général des Pyrénées Atlantiques
> Direction des Moyens Techniques
> 64 avenue Jean Biray
> 64058 Pau Cedex 9
> ----------------------------------------------------------------------------
> -
>



More information about the mapserver-users mailing list