Hi all,
In Mapbuilder, the layer have opacity attribute. But when print map, i can’t print layer with its opacity. Can I get map from Geoserver with Opacity argument?
–
Nguyễn Đình Toán
Neu khong doc duoc tieng Viet, vui long vao menu View → chon Encoding → chon Unicode (UTF-8). Cam on.
Hi,
There is no direct request parameter (that i know of) to control opacity. It is specified inside the style (SLD document) you specify. Example:
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FF4D4D</CssParameter>
<CssParameter name="fill-opacity">0.7</CssParameter>
</Fill>
</PolygonSymbolizer>
If you look at the "popshade.sld" file in the "styles" directory of your geoserver data directory you will find an example.
-Justin
Toan Nguyen wrote:
Hi all,
In Mapbuilder, the layer have opacity attribute. But when print map, i can't
print layer with its opacity. Can I get map from Geoserver with Opacity
argument?
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
!DSPAM:4007,480c46d6121602458217002!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,480c46d6121602458217002!
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
thanks, but I dont want to change SLD, because Mapbuilder can set Opacity for a layer in LayerControl. And when print map, the layer must have opacity which use select.
On Mon, Apr 21, 2008 at 9:37 PM, Justin Deoliveira <jdeolive@…1…> wrote:
Hi,
There is no direct request parameter (that i know of) to control opacity. It is specified inside the style (SLD document) you specify. Example:
#FF4D4D
0.7
If you look at the “popshade.sld” file in the “styles” directory of your geoserver data directory you will find an example.
-Justin
–
Justin Deoliveira
The Open Planning Project
jdeolive@…1…
–
Nguyễn Đình Toán
Neu khong doc duoc tieng Viet, vui long vao menu View → chon Encoding → chon Unicode (UTF-8). Cam on.
Toan Nguyen ha scritto:
thanks, but I dont want to change SLD, because Mapbuilder can set Opacity for a layer in LayerControl. And when print map, the layer must have opacity which use select.
This is not possible, we don't have an opacity vendor parameter in
the WMS request, probably MapBuilder is changing the opacity of a layer
using some CSS parameter for the images, but Geoserver is generating
them "solid" (well, that is, besides eventual transparent background
and any translucency you might set in the SLD).
Moreover, be aware that even changing the SLD only PNG full color
supports single layer translucency, other formats only do support
solid color.
As for adding such vendor parameter, it's of course possible but it
would require a bit of coding (and twice the RAM per request too
since we'd have to render it solid and then change the alpha of
the image painting it over another empty image).
Feel free to open a jira issue, but if you need it now, consider
either creating the patch yourself or sponsoring some developer
to create it for you.
Cheers
Andrea