fix clearing scaled tiles

This commit is contained in:
Mourner 2011-04-14 18:07:16 +03:00
parent 4003a9d9b0
commit 8089ff04a0

View File

@ -419,7 +419,8 @@ L.Map = L.Class.extend({
// clear scaled tiles after all new tiles are loaded (for performance)
this._tileLayersToLoad--;
if (this._tileLayersNum && !this._tileLayersToLoad && this._tileBg) {
setTimeout(L.Util.bind(this._clearTileBg, this), 500);
clearTimeout(this._clearTileBgTimer);
this._clearTileBgTimer = setTimeout(L.Util.bind(this._clearTileBg, this), 500);
}
},