| 125 | | |
| 126 | | //bind a listener to the onload of the iframe so that we |
| 127 | | // can register when a tile has finished loading. |
| 128 | | var onload = function() { |
| 129 | | this.show(); |
| 130 | | //normally isLoading should always be true here but there are some |
| 131 | | // right funky conditions where loading and then reloading a tile |
| 132 | | // with the same url *really*fast*. this check prevents sending |
| 133 | | // a 'loadend' if the msg has already been sent |
| 134 | | // |
| 135 | | if (this.isLoading) { |
| 136 | | this.isLoading = false; |
| 137 | | this.events.triggerEvent("loadend"); |
| 138 | | } |
| 139 | | }; |
| | 193 | |
| | 194 | //bind a listener to the onload of the iframe so that we |
| | 195 | // can register when a tile has finished loading. |
| | 196 | var onload = function() { |
| | 197 | this.show(); |
| | 198 | //normally isLoading should always be true here but there are some |
| | 199 | // right funky conditions where loading and then reloading a tile |
| | 200 | // with the same url *really*fast*. this check prevents sending |
| | 201 | // a 'loadend' if the msg has already been sent |
| | 202 | // |
| | 203 | if (this.isLoading) { |
| | 204 | this.isLoading = false; |
| | 205 | this.events.triggerEvent("loadend"); |
| | 206 | } |
| | 207 | }; |
| | 208 | OpenLayers.Event.observe(iframe, 'load', |
| | 209 | OpenLayers.Function.bind(onload, this)); |