mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
Improved TileImageLoader
This commit is contained in:
parent
fb00a11f4b
commit
5fde94acb9
7 changed files with 88 additions and 60 deletions
|
|
@ -31,7 +31,7 @@ namespace MapControl
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// An IImageCache implementation used to cache tile images. The default is null.
|
||||
/// An IImageCache implementation used to cache tile images.
|
||||
/// </summary>
|
||||
public static Caching.IImageCache Cache { get; set; }
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ namespace MapControl
|
|||
{
|
||||
var tcs = new TaskCompletionSource<object>();
|
||||
|
||||
await tile.Image.Dispatcher.RunAsync(CoreDispatcherPriority.Low, async () =>
|
||||
async void callback()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -80,7 +80,9 @@ namespace MapControl
|
|||
{
|
||||
tcs.TrySetException(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
await tile.Image.Dispatcher.RunAsync(CoreDispatcherPriority.Low, callback);
|
||||
|
||||
await tcs.Task.ConfigureAwait(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue