RE: png: Internet Explorer and Mozilla

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: png: Internet Explorer and Mozilla

Carolyn Cole
Hello,

I wanted to post a solution to a problem that I had passing an SLD_BODY
using the png fix I posted with this thread.

Unfortunately the AlphaImageLoader does not encode the # sign properly, so
if you specify a color you will start getting errors similar to this one:
        12:55:16,109 INFO  [STDOUT] org.vfny.geoserver.wms.WmsException:
org.xml.sax.SAXParseException: XML document structures
        must start and end within the same entity.

The solution is to doubly escape the # sign... so in your URL you would
pass %25%32%33 instead of %23 to the AlphaImageLoader.

You only need to worry about this on IE.

I have updated my version of pngfix to include the second escape and
attached it to this file.

Hopefully this saves others some time!

-- Carolyn


At 07:50 AM 4/29/2005, Carolyn Cole wrote:

>It is definitely because IE does not support PNG transparancy.
>
>Do a google search on IE transparent PNG.  You will find many Java Script
>solutions that use the DXImageTransform.Microsoft.AlphaImageLoader.
>
>I have attached my combined version that meets my needs.  To use it
>include the following Java Script at the top of your page:
>
><!--[if gte IE 5.5000]>
><script type="text/javascript" src="scripts/pngfix.js"></script>
><![endif]-->
>
>This assumes that you have a scripts directory under the directory where
>you page exists.
>
>At 03:22 PM 4/28/2005, you wrote:
>>Hi Ben,
>>
>>I think this is because IE doesn't handle PNG transparency correctly.  It
>>may be safe to use GIF as the output format.
>>
>>I've recently updated the Sarissa library used in mapbuilder and it is
>>supposed to work in Konqueror and Safari browsers as well (not tested
>>though!).
>>
>>Mike Adair
>>
>> > -----Original Message-----
>> > From: [hidden email]
>> > [mailto:[hidden email]] On
>> > Behalf Of Benjamin Thelen
>> > Sent: Thursday, April 28, 2005 1:26 PM
>> > To: [hidden email];
>> > [hidden email]
>> > Subject: [Geoserver-users] png: Internet Explorer and Mozilla
>> >
>> > Hi,
>> >
>> > Please check out the links
>> > http://wms1.ccgis.de/geoserver-1.3-beta3/data/mbdemos/demo/cit
>> > e/index.html
>> > http://wms1.ccgis.de/geoserver-1.3-beta3/data/mbdemos/demo/wfs
>> > -t/index.html
>> >
>> >
>> > with Internet Explorer and with Mozilla/Thunderbird!
>> >
>> > Internet Explorer displays a grey picture. Switch off a layer and you
>> > see another layer!
>> >
>> >
>> > What can I do?
>> >
>> > Ben
>> >
>> >
>> >
>> >
>> >
>> >
>> > -------------------------------------------------------
>> > SF.Net email is sponsored by: Tell us your software development plans!
>> > Take this survey and enter to win a one-year sub to SourceForge.net
>> > Plus IDC's 2005 look-ahead and a copy of this survey
>> > Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>>
>>
>>-------------------------------------------------------
>>SF.Net email is sponsored by: Tell us your software development plans!
>>Take this survey and enter to win a one-year sub to SourceForge.net
>>Plus IDC's 2005 look-ahead and a copy of this survey
>>Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
>>_______________________________________________
>>Geoserver-users mailing list
>>[hidden email]
>>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>


pngfix.js (1K) Download Attachment