Register a CHANGE listener even if tile is loading

This fixes an issue easily reproducible in the side-by-side example where the DOM renderer is not notified when tiles loaded by the WebGL renderer have been received.
This commit is contained in:
Éric Lemoine
2012-11-08 21:20:26 +01:00
parent 90e379782c
commit 826505c6d4

View File

@@ -139,11 +139,9 @@ ol.renderer.dom.TileLayer.prototype.render = function() {
tilesToDrawByZ[z][key] = tile;
return;
} else {
if (state != ol.TileState.LOADING) {
goog.events.listen(tile, goog.events.EventType.CHANGE,
this.handleTileChange_, false, this);
tile.load();
}
goog.events.listen(tile, goog.events.EventType.CHANGE,
this.handleTileChange_, false, this);
tile.load();
}
/**