fix clearing tile background on zoom
This commit is contained in:
parent
c6ddf37eb2
commit
2f4e81ab3a
@ -350,6 +350,7 @@ L.Map = L.Class.extend({
|
|||||||
this._initialTopLeftPoint._add(offset);
|
this._initialTopLeftPoint._add(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._tileLayersToLoad = this._tileLayersNum;
|
||||||
this.fire('viewreset');
|
this.fire('viewreset');
|
||||||
|
|
||||||
this.fire('move');
|
this.fire('move');
|
||||||
@ -432,6 +433,7 @@ L.Map = L.Class.extend({
|
|||||||
// clear scaled tiles after all new tiles are loaded (for performance)
|
// clear scaled tiles after all new tiles are loaded (for performance)
|
||||||
this._tileLayersToLoad--;
|
this._tileLayersToLoad--;
|
||||||
if (this._tileLayersNum && !this._tileLayersToLoad && this._tileBg) {
|
if (this._tileLayersNum && !this._tileLayersToLoad && this._tileBg) {
|
||||||
|
console.log(this._tileLayersToLoad, this._tileLayersNum, 'clear');
|
||||||
clearTimeout(this._clearTileBgTimer);
|
clearTimeout(this._clearTileBgTimer);
|
||||||
this._clearTileBgTimer = setTimeout(L.Util.bind(this._clearTileBg, this), 500);
|
this._clearTileBgTimer = setTimeout(L.Util.bind(this._clearTileBg, this), 500);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user