I forgot to mention that that test script uses an important trick to test: it saves the mapfile to a temporary file, where you can confirm that a COMPOSITE object is indeed created (here is that script again https://ms4w.com/trac/wiki/SWIGMapScriptOpacity )

-jeff


--

Thank you for using MS4W.
"MS4W: open doors as well as windows"


--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/



On 2019-05-16 8:47 AM, Jeff McKenna wrote:
Hi Sven,

As you know, all methods and functions are now listed in the SWIG API reference document when using MS4W 4.0, and in the layerObj methods section you can see a setOpacity() function (https://mapserver.org/mapscript/mapscript.html#layerobj-methods).

Another trick is to open the local included file "C:/ms4w/apps/phpmapscriptng-swig/include/mapscript.php" in your text editor and search for "opacity" or "setOpacity" there, just to confirm with your local installation of MS4W.

Recently another MS4W user asked about opacity, so I had created a test script showing setOpacity() in action with SWIG MapScript: https://ms4w.com/trac/wiki/SWIGMapScriptNewLayer

However, I admit that that example script is long and opacity is kind of hidden in the code, so I have created another example for you at: https://ms4w.com/trac/wiki/SWIGMapScriptOpacity which takes an existing layer and adds a COMPOSITE object with the command:

   // set opacity (actually creates a new COMPOSITE object)
   $oPolyLayer->setOpacity(40);

I hope that makes it more clear.

-jeff


_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to