MapTileLayer implementation

This commit is contained in:
ClemensFischer 2025-08-18 22:23:19 +02:00
parent 933cb7f2ba
commit 407f786640
4 changed files with 17 additions and 26 deletions

View file

@ -79,9 +79,9 @@ namespace MapControl
{
pendingTiles?.Clear();
if (tiles != null && tileSource != null)
if (tileSource != null && tiles != null && (tiles = tiles.Where(tile => tile.IsPending)).Any())
{
pendingTiles = new ConcurrentStack<Tile>(tiles.Where(tile => tile.IsPending).Reverse());
pendingTiles = new ConcurrentStack<Tile>(tiles.Reverse());
var tileCount = pendingTiles.Count;
var taskCount = Math.Min(tileCount, MaxLoadTasks);