I’d like to generate a raster image with transparency from a shapefile. I send requests like this one:
(…)/geoserver/wms?bbox=(…)&styles=&Format=image/png&request=GetMap&version=1.1.1&layers=(…)&width=505&height=550&srs=EPSG:4326
And i get a correct image, but it has no transparency, background color around the shape is white.
Same result if i try Format=image/png8, palette=safe etc.
But if i request a KMZ file (Format=application/vnd.google-earth.kmz+XML) and unzip it, the png file included does have transparency. Why can’t i obtain transparency when i directly request an image?
(I am not using IE6…)
Regards
****************************************************************************************** CONFIDENTIALITY NOTICE This e-mail and any attachment are confidential and may be privileged or otherwise protected from disclosure. It is solely intended for the person(s) named above. If you are not the intended recipient, any reading, use, disclosure, copying or distribution of all or parts of this e-mail or associated attachments is strictly prohibited. If you are not an intended recipient, please notify the sender immediately by replying to this message or by telephone and delete this e-mail and any attachments permanently from your system.
|
Just add transparent=true to the GetMap request and that should do the trick.
-Justin
Bultrighini Filippo wrote:
I'd like to generate a raster image with transparency from a shapefile. I send requests like this one:
(...)/geoserver/wms?bbox=(...)&styles=&Format=image/png&request=GetMap&version=1.1.1&layers=(...)&width=505&height=550&srs=EPSG:4326
And i get a correct image, but it has no transparency, background color around the shape is white.
Same result if i try Format=image/png8, palette=safe etc.
But if i request a KMZ file (Format=application/vnd.google-earth.kmz+XML) and unzip it, the png file included does have transparency. Why can't i obtain transparency when i directly request an image?
(I am not using IE6...)
Regards
******************************************************************************************
CONFIDENTIALITY NOTICE
This e-mail and any attachment are confidential and may be privileged or otherwise protected from disclosure. It is solely intended for the person(s) named above. If you are not the intended recipient, any reading, use, disclosure, copying or distribution of all or parts of this e-mail or associated attachments is strictly prohibited. If you are not an intended recipient, please notify the sender immediately by replying to this message or by telephone and delete this e-mail and any attachments permanently from your system.
------------------------------------------------------------------------
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.