[mapserver-dev] PHP_MapScript - set opacity of a styleObj

Mike Leahy mgleahy at alumni.uwaterloo.ca
Wed Aug 27 01:53:58 EDT 2008


Hello devs,

I'm just wondering if I'm missing anything (since the online 
documentation claims to be out-of-date).  I'm trying to create a new 
layer in a PHP_MapScript map object that has opacity set in a styleObj. 
  But when I execute $oStyle->set("opacity",50), I get an error message 
saying "Property 'opacity' does not exist in this object.".  The same 
happens for transparency.  Is there a different way I should be doing this?

Since style-level opacity is a new feature, I'm guessing it hasn't made 
its way into mapscript yet?  If that is the case, what would be needed 
to add this, and/or is there a workaround I that can use instead?  The 
only alternative I can imagine at this point is to save the map object 
to a temporary mapfile, write the new layers as text in the mapfile, 
then read it back into a new map object.  Is that my best option?

Thanks for any suggestions,
Mike


More information about the mapserver-dev mailing list