[OpenLayers-Users] IE6 performance

Christopher Schmidt crschmidt at metacarta.com
Mon Nov 12 10:36:41 EST 2007


On Mon, Nov 12, 2007 at 03:16:10PM +0000, Mapserver Lists wrote:
> Dear All
> 
> We are currently working on a project that integrates OL - using a
> tilecache layer and a marker layer. We seem to be having some kind of
> problem with IE6 however, as when it loads it seems to hang for a VERY
> long time. I think that it seems to be loading all of the tiles and
> markers first before rendering anything.
> 
> Is this known behaviour or do we have our setup wrong. It works great
> on FF and IE7.

Without looking at your link, I'm guessing you're using the 'alpha'
option on some transparent PNG layer to get transparency of images. This
works on small images (the markers) to an extent, but IE6 doesn't have
Alpha PNG support because the support that is available is too slow to
use, so using the 'alpha' flag on a layer will likely cause exactly the
behavior you just described. Since 'alpha' is only respected on IE6 (on
other platforms it does nothing) this matches your description.

Now I'll go look at your link. :)

I was wrong. Instead, the problem is that you're loading > 1000 points
into a map. This doesn't work for the same reason as above, though at
least in this case, the project documentation is at fault. :)

In theory, if you were to change the icon to being a .gif, you could
make that transparent, and you'd get somewhat choppy edges, but it would
work... 

  ... however, since the alpha-png hack is *always* applied, you'd have
to do some hacking to turn that off. (Actually,
OpenLayers.Util.alphaHack = function() { return false; } would
accomplish that for you.)

So, to test my theory, do:

OpenLayers.Util.alphaHack = function() { return false; }

If that works, then you can dig into the code and start trying to make
it only do that on the markers (or make your control icons transparent
pngs as well in some way). 

Sorry that this doesn't work more trivially yet, but I look forward to
any info you can provide.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list