mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-20 22:05:07 +00:00
Update TileImageLoader.cs
This commit is contained in:
parent
0aff99138c
commit
f0bf2e761e
1 changed files with 4 additions and 6 deletions
|
|
@ -125,13 +125,11 @@ namespace MapControl
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tileNumber = tileCount - tileQueue.Count;
|
progress?.Report(1d - (double)tileQueue.Count / tileCount);
|
||||||
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;
|
tile.IsPending = false;
|
||||||
|
Logger?.LogDebug("Thread {thread,2}: Loading tile ({zoom}/{column}/{row})", Environment.CurrentManagedThreadId, tile.ZoomLevel, tile.Column, tile.Row);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -166,9 +164,9 @@ namespace MapControl
|
||||||
|
|
||||||
private static async Task<byte[]> LoadCachedBuffer(Tile tile, Uri uri, string cacheName)
|
private static async Task<byte[]> LoadCachedBuffer(Tile tile, Uri uri, string cacheName)
|
||||||
{
|
{
|
||||||
var extension = Path.GetExtension(uri.LocalPath);
|
var extension = Path.GetExtension(uri.LocalPath).ToLower();
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(extension) || extension.Equals(".jpeg", StringComparison.OrdinalIgnoreCase))
|
if (string.IsNullOrEmpty(extension) || extension.Equals(".jpeg"))
|
||||||
{
|
{
|
||||||
extension = ".jpg";
|
extension = ".jpg";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue