Merge pull request #322 from ahocevar/322
WMS loadend event does not always fire
This commit is contained in:
@@ -1061,7 +1061,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
this.numLoadingTiles--;
|
||||
this.events.triggerEvent("tileloaded", {tile: tile});
|
||||
//if that was the last tile, then trigger a 'loadend' on the layer
|
||||
if (this.tileQueue.length === 0 && this.numLoadingTiles === 0) {
|
||||
if (this.numLoadingTiles === 0) {
|
||||
this.events.triggerEvent("loadend");
|
||||
if(this.backBuffer) {
|
||||
// the removal of the back buffer is delayed to prevent flash
|
||||
|
||||
Reference in New Issue
Block a user