htd


Hi,

I am using Virtual Earth API v5 to overlay custom tile (generated on fly by server in PNG format).

The tile look fine in IE 7 and Firefox. However in IE 6, there are a lot of black blocks in the place where it supposed to be transparent. The black blocks doen't cover the entire transparent area but just few places.

Please see the below link for details:

http://www.i-i-uc.i-i-sr.com/test/

Please helps if you have any idea about what may cause the problem. Thank you very much.




Re: transparent problem with custom tile in PNG format

Kartik


I believe its a known issue that IE6 cannot render transparency on PNG's very well. However, the behavior you describe is actually different from the typical behavior. Normally you will see a grayish-blue background where the transparency should be, and it would occur wherever there is transparency in the image, not in select locations like you describe

In general, the fix for PNG transparency in IE6 is to use the AlphaImageLoader filter to render the transparency properly. I'm not an expert in filters, but I believe you can think of them as a Microsoft extension to CSS.

http://msdn2.microsoft.com/en-us/library/ms532969.aspx

The filter takes a url to the image as one of its parameters, so you might have to dynamically apply the filter to the tile after they have been rendered on the page, and the image URL has been generated.

Hopefully this information will get you on the path to fixing the issue...

Kartik






Re: transparent problem with custom tile in PNG format

SoulSolutions

Good thread about the issue on VE tiles here:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1120015&SiteID=1

We refer to a fix from Lewis Harvey:

http://www.lewisharvey.net/blog/ p=29

What version of VE are you using, all the fixes are from a while ago Was this bug not solved yet

There is also this post:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1226599&SiteID=1

John.







Re: transparent problem with custom tile in PNG format

htd

Thank you for your helps.

I am using version 5 of the API. The custome tile is rendered on the server in PNG format using GDI+

library in .NET.

I tried the fix from Lewis Harvey but is not working. His fix is for IE7, not IE6 and what he did is

removing the filter in IE7 because transparency was handled correctly in IE7.

My situation is not the same. I had problem with IE6 only, it look fine in IE7.
So I guess the API doesn't handle transparency correctly in IE6

Please help if you have further suggestion. Thank you.





Re: transparent problem with custom tile in PNG format

Carl J

IE6 doesn't support alpha transparency ... there are javascript files out there that will apply a filter attribute to the image's css style. Also you might want to downgrade your pngs to 8bit, which is what we have done. Another option is to use GIFs.





Re: transparent problem with custom tile in PNG format

htd

Thank you.

I tried to use 8bit transparent gif but there are 2 problem. First, when I overlay it on the map, it render white instead of transparent. Second, 8bit gif doesn't look ok in my application.






Re: transparent problem with custom tile in PNG format

Carl J

I meant 8bit PNGs ... OR, GIFs ...

The problem though with the 8bit PNGs, is that you lose the semi transparency

There are javascripts out there that loop through all of the images on the page, and add a filter to the images style, however when I tried this before, it worked when the map loaded up, but not when the pins were re-rendered (from a zoom in or out, or moving the map).




Re: transparent problem with custom tile in PNG format

Carl J

Another thing that you could do, is detect if the user is using IE6, and if so, then display a lower quality image, but for every other browser display the PNGs.

I know this isn't quite what you wanted, but this is what happens when you mix old and new together.