Version 4.12.2 Fixed local file handling for UWP. All relative paths relative to ms-appx:

This commit is contained in:
ClemensF 2019-06-15 01:39:07 +02:00
parent 26bf0b5005
commit c28387f87c
14 changed files with 172 additions and 192 deletions

View file

@ -6,7 +6,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@ -57,7 +56,7 @@ namespace MapControl
/// If the UriFormat of TileSource starts with "http" and SourceName is a non-empty string,
/// tile images will be cached in the TileImageLoader's Cache.
/// </summary>
public async void LoadTilesAsync(IEnumerable<Tile> tiles)
public void LoadTilesAsync(IEnumerable<Tile> tiles)
{
tileQueue.Clear();
tileQueue.Enqueue(tiles);
@ -68,9 +67,10 @@ namespace MapControl
{
Interlocked.Add(ref taskCount, newTasks);
await Task
.WhenAll(Enumerable.Range(0, newTasks).Select(n => LoadTilesFromQueueAsync()))
.ConfigureAwait(false);
while (--newTasks >= 0)
{
Task.Run(() => LoadTilesFromQueueAsync());
}
}
}