mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
20 lines
560 B
C#
20 lines
560 B
C#
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|||
|
|
// Copyright © 2024 Clemens Fischer
|
|||
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|||
|
|
|
|||
|
|
using System;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace MapControl
|
|||
|
|
{
|
|||
|
|
public partial class TileImageLoader
|
|||
|
|
{
|
|||
|
|
private static async Task LoadTileAsync(Tile tile, Func<Task<IImage>> loadImageFunc)
|
|||
|
|
{
|
|||
|
|
var image = await loadImageFunc().ConfigureAwait(false);
|
|||
|
|
|
|||
|
|
await Dispatcher.UIThread.InvokeAsync(() => tile.SetImageSource(image));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|