Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/source/source_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,15 @@ class SourceCache extends Evented {
}

getVisibleCoordinates(symbolLayer?: boolean): Array<OverscaledTileID> {
const coords = this.getRenderableIds(symbolLayer).map((id) => this._tiles[id].tileID);
for (const coord of coords) {
const renderableIds = this.getRenderableIds(symbolLayer);
const coords = new Array(renderableIds.length);

for (let i = 0; i < renderableIds.length; i++) {
const id = renderableIds[i];
const coord = coords[i] = this._tiles[id].tileID;
coord.posMatrix = this.transform.calculatePosMatrix(coord.toUnwrapped());
}

return coords;
}

Expand Down