[OpenLayers-Users] Broken image for no tile, on Chrome

Warren Vick wvick at europa.uk.com
Tue Nov 10 07:52:43 EST 2009


Hi Andreas,

I was on 2.7, but have just updated to 2.8.

I already had this line in my code, but unfortunately missing tiles still show as broken on Chrome.
OpenLayers.Util.onImageLoadErrorColor = "transparent";

I tried the CSS too, but still no joy. I've also found that the problem also shows in Safari (Mac).

Regards,
Warren

-----Original Message-----
From: Andreas Hocevar [mailto:ahocevar at opengeo.org] 
Sent: 10 November 2009 11:03 AM
To: Warren Vick
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] Broken image for no tile, on Chrome

Warren Vick wrote:
> I've just noticed that Chrome has a different behaviour to other browsers when OL is using a TMS layer and there is no tile present. While IE and FF show nothing, Chrome shows an ugly broken image icon. Anyone know how this can be avoided?
>   

For OpenLayers 2.8, set the following after the script tag that loads
OpenLayers.js:

OpenLayers.Util.onImageLoadErrorColor = "transparent";

For OpenLayers SVN (trunk), set the following as your last CSS
definition, and after
the script tag that loads OpenLayers.js:

.olImageLoadError {
    background-color: transparent;
}

Regards,
Andreas.

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list