For those 18% of you using IE6 (or for those of you developing sites for the public to consume), you may come across a problem in which map tiles with transparency show up partly dark or partly black.


Our ArcGIS Server is handing out a .JPG base layer, and a PNG8 layer showing parcels to overlay on top. The top layer needs to have a transparent background so we can see the basemap, right? Great. Everything is peachy in FF3, FF2, and IE7. In IE6, *parts* of some of the transparent tiles are showing up black! We noticed that it seems to be worse in areas where the parcel boundaries are relatively close together.
In the ESRI JavaScript Extensions for Virtual Earth, we were also setting the parcel layer's opacity to .9 (layer.setOpacity = 0.9;).
I've also seen these transparency problems using MS MapCruncher to create a tilecache for consumption in Virtual Earth.
After searching blogs and forums, and after our team was about out of options, I stumbled across this page. The key line that helped me out was "With MSIE 6 you can only have transparency or opacity control, not both."
So ArcGIS Server is giving us PNG8s with transparent background, AND we were setting the opacity using JavaScript. No good.
I commented out the layer.setOpacity = 0.9; and, voila! Everything works in IE6+....
Hope this helps someone!
0 comments:
Post a Comment