mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update TileImageLoader.cs
This commit is contained in:
parent
2cf8636f4c
commit
fce05c2ed1
|
|
@ -121,12 +121,12 @@ namespace MapControl
|
|||
{
|
||||
tile.IsPending = false;
|
||||
|
||||
var tilesLoaded = tileCount - tileStack.Count;
|
||||
var tileNumber = tileCount - tileStack.Count;
|
||||
|
||||
progress?.Report((double)tilesLoaded / tileCount);
|
||||
progress?.Report((double)tileNumber / tileCount);
|
||||
|
||||
Logger?.LogTrace("[{thread}] Loading tile {loaded} of {count}: {zoom}/{column}/{row}",
|
||||
Environment.CurrentManagedThreadId, tilesLoaded, tileCount, tile.ZoomLevel, tile.Column, tile.Row);
|
||||
Logger?.LogTrace("Loading tile {number} of {count} ({zoom}/{column}/{row}) in thread {thread}",
|
||||
tileNumber, tileCount, tile.ZoomLevel, tile.Column, tile.Row, Environment.CurrentManagedThreadId);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -170,8 +170,6 @@ namespace MapControl
|
|||
|
||||
private static async Task<byte[]> LoadCachedBuffer(Tile tile, Uri uri, string cacheName)
|
||||
{
|
||||
byte[] buffer = null;
|
||||
|
||||
var extension = Path.GetExtension(uri.LocalPath);
|
||||
|
||||
if (string.IsNullOrEmpty(extension) || extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase))
|
||||
|
|
@ -180,6 +178,7 @@ namespace MapControl
|
|||
}
|
||||
|
||||
var cacheKey = $"{cacheName}/{tile.ZoomLevel}/{tile.Column}/{tile.Row}{extension}";
|
||||
byte[] buffer = null;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue