mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 4.12.2 Fixed local file handling for UWP. All relative paths relative to ms-appx:
This commit is contained in:
parent
26bf0b5005
commit
c28387f87c
14 changed files with 172 additions and 192 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue