[OpenLayers-Dev] Problem with Alpha Layer

Jochen Grefe jochen.grefe at ingenieurteam2.com
Sat Sep 29 16:25:08 EDT 2007


Hello Christopher,

Trying to reply while my little daughter is sitting and playing on my
knees.

> alpha set to true is unlikely to be very useful to you. 
> Unfortunately, the one problem it is designed to fix -- transparency 
> issues in IE -- is a huge performance hit, because IE can't apply the 
> image hack to images that quickly.
> 
> So, you should probably not be using the alpha: true without careful 
> consideration.

So the only way is to use gifs when IO want to use transprent layers.

> Immediately after the line you changed, there is another set of load 
> listeners that are registered. So, I don't think this is quite the 
> problem you are looking for.

createAlphaImageDiv:
//This eventlisteners are handling the created div (bind div to
onImageLoad)OpenLayers.Event.observe(img,   "load",
OpenLayers.Function.bind(OpenLayers.Util.onImageLoad, div));
                              
createImage:
//This eventlisteners are handling the created image (bind image to
onImageLoad) OpenLayers.Event.observe(image, "load",
OpenLayers.Function.bind(OpenLayers.Util.onImageLoad, image));

> Can you investigate if the images are actually completing loading?
> Firebug is useful for this.

Yepp. Firebug is fantastic - and I found the error with Firebug.
The tile is already loaded but set to display: none

> I'd be really surprised if this solved the problem. The 
> image.style.display is only set to none (as far as I can see in Util) 
> if delayDisplay is set to true -- so you shouldn't see the images hide

> at all...




More information about the Dev mailing list