diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index c3037256b6..7d6269c348 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -346,6 +346,23 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile.BackBufferable, { this.isLoading = false; this.events.triggerEvent("loadend"); + // IE<7 needs a reflow when the tiles are loaded because of the + // percentage based positioning. Otherwise nothing is shown + // until the user interacts with the map in some way. + if (parseFloat(navigator.appVersion.split("MSIE")[1]) < 7) { + if (!this.layer || !this.layer.div) { + // nothing to do if the layer is destroyed already + return; + } + var span = document.createElement("span"); + span.style.display = "none"; + var layerDiv = this.layer.div; + layerDiv.appendChild(span); + window.setTimeout(function() { + span.parentNode === layerDiv && span.parentNode.removeChild(span); + }, 0); + } + if (this.layerAlphaHack === true) { img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +