<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi,<br></div><div><br></div><div>I think OPACITY should still work at the STYLE level: <a href="https://mapserver.org/mapfile/style.html#mapfile-style-opacity">https://mapserver.org/mapfile/style.html#mapfile-style-opacity</a><br></div><div>If you are using WMS then you could setup different styles with different OPACITY values, and then use named styles to select the appropriate style (with the STYLES= added to the WMS request). <br></div><div><br></div><div>Seth<br></div><div><br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Wed, Feb 22, 2023, at 4:46 PM, Steve Lime wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi Matthew: That functionality was indeed removed as part of 8.0. I kind of expect that we might build back something for more limited use cases if necessary, Does SLD support opacity/transparency? <br></div><div><br></div><div>--Steve<br></div><div><br></div></div><div><br></div><div class="qt-gmail_quote"><div dir="ltr" class="qt-gmail_attr">On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber <<a href="mailto:grabermtw@gmail.com">grabermtw@gmail.com</a>> wrote:<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div dir="ltr"><div>Hello all!<br></div><div><br></div><div>With MapServer 8, I'm wondering what the proper way to change the opacity of a single layer in a multilayer WMS request is.<br></div><div><br></div><div>For example, the following URL excerpt shows the old way of accomplishing this that worked while using MapServer 7:<br></div><div><br></div><div>SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=test_a,test_b&map.layer[test_b]=OPACITY+50<br></div><div><br></div><div>My understanding is that this would have the same effect as adding "OPACITY 50" to the test_b layer in the mapfile. The mapfile containing test_a and test_b did not have OPACITY included when they were written. Obviously, this no longer works with MapServer 8, and now that request has the same results as omitting the "&map.layer[test_b]=OPACITY+50" portion entirely.<br></div><div><br></div><div>Based on <a href="https://mapserver.org/fr/MIGRATION_GUIDE.html" target="_blank">https://mapserver.org/fr/MIGRATION_GUIDE.html</a>, I see that OPACITY now belongs inside a COMPOSITE object. I tried the following modifications to the request URL:<br></div><div><br></div><div>SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=test_a,test_b&map.layer[test_b].composite=OPACITY+50<br></div><div>SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=test_a,test_b&map.layer[test_b].composite[0]=OPACITY+50<br></div><div><br></div><div>I also tried this both with the mapfile left as-is, and with an empty COMPOSITE object being included in each layer object, and each time I got the same unsuccessful result as before.<br></div><div><br></div><div>Is there a way to accomplish this in MapServer 8?<br></div><div><br></div><div>Also, does this map.layer[layername]=... syntax still work in MapServer 8? The documentation at <a href="https://mapserver.org/cgi/controls.html#using-mapserver-version-8" target="_blank">https://mapserver.org/cgi/controls.html#using-mapserver-version-8</a> suggests it might no longer work for MapServer 8 (based on the heading "Using MapServer version < 8"), but the documentation at <a href="https://mapserver.org/pdf/MapServer.pdf" target="_blank">https://mapserver.org/pdf/MapServer.pdf</a> shows the same examples with the heading "Using MapServer version <= 8" on page 1065 of the PDF, so I'm unsure if this is still intended to work in MapServer 8.<br></div><div><br></div><div>Thank you,<br></div><div>Matt<br></div></div><div>_______________________________________________<br></div><div> MapServer-users mailing list<br></div><div> <a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br></div><div> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div></blockquote><div><br></div></body></html>