Update TileImageLoader.cs

This commit is contained in:
ClemensFischer 2025-10-22 17:19:57 +02:00
parent 9b05281fb7
commit 0aff99138c

View file

@ -115,7 +115,6 @@ namespace MapControl
while (true)
{
Tile tile;
int tileNumber;
lock (tileQueue)
{
@ -126,16 +125,14 @@ namespace MapControl
break;
}
tileNumber = tileCount - tileQueue.Count;
var tileNumber = tileCount - tileQueue.Count;
progress?.Report((double)tileNumber / tileCount);
Logger?.LogDebug("Loading tile {number} of {count} ({zoom}/{column}/{row}) in thread {thread}",
tileNumber, tileCount, tile.ZoomLevel, tile.Column, tile.Row, Environment.CurrentManagedThreadId);
}
tile.IsPending = false;
progress?.Report((double)tileNumber / tileCount);
Logger?.LogDebug("Loading tile {number} of {count} ({zoom}/{column}/{row}) in thread {thread}",
tileNumber, tileCount, tile.ZoomLevel, tile.Column, tile.Row, Environment.CurrentManagedThreadId);
try
{
// Pass tileSource.LoadImageAsync calls to platform-specific method