Skip to content

Commit

Permalink
correctly set tileID wrap when adding a tile from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis committed Apr 2, 2018
1 parent bbee7e5 commit 2534dc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/source/source_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,10 @@ class SourceCache extends Evented {
return tile;


tile = this._cache.getAndRemove((tileID.key: any));
tile = this._cache.getAndRemove((tileID.wrapped().key: any));
if (tile) {
// set the tileID because the cached tile could have had a different wrap value
tile.tileID = tileID;
if (this._cacheTimers[tileID.key]) {
clearTimeout(this._cacheTimers[tileID.key]);
delete this._cacheTimers[tileID.key];
Expand Down

0 comments on commit 2534dc0

Please sign in to comment.