Skip to content

Commit

Permalink
Use map transform in case when source is not yet loaded on _preloadTiles
Browse files Browse the repository at this point in the history
  • Loading branch information
stepankuzmin committed May 8, 2023
1 parent d746cbc commit d5eaabb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/source/source_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,10 @@ class SourceCache extends Evented {
}

const tileIDs = Array.from(coveringTilesIDs.values());
const tileZoom = this.transform ? this.transform.tileZoom : this.map.transform.tileZoom;

asyncAll(tileIDs, (tileID, done) => {
const tile = new Tile(tileID, this._source.tileSize * tileID.overscaleFactor(), this.transform.tileZoom, this.map.painter, this._isRaster);
const tile = new Tile(tileID, this._source.tileSize * tileID.overscaleFactor(), tileZoom, this.map.painter, this._isRaster);
this._loadTile(tile, (err) => {
if (this._source.type === 'raster-dem' && tile.dem) this._backfillDEM(tile);
done(err, tile);
Expand Down

0 comments on commit d5eaabb

Please sign in to comment.