mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Refactored TileImageLoader
This commit is contained in:
parent
c78e72f735
commit
d4e851e0f7
4 changed files with 30 additions and 24 deletions
|
|
@ -25,7 +25,7 @@ namespace MapControl
|
|||
public static ObjectCache Cache { get; set; } = MemoryCache.Default;
|
||||
|
||||
|
||||
private static async Task LoadCachedTileAsync(Tile tile, Uri uri, string cacheKey)
|
||||
private static async Task LoadCachedTile(Tile tile, Uri uri, string cacheKey)
|
||||
{
|
||||
var cacheItem = Cache.Get(cacheKey) as Tuple<byte[], DateTime>;
|
||||
var buffer = cacheItem?.Item1;
|
||||
|
|
@ -53,7 +53,7 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
private static async Task LoadTileAsync(Tile tile, TileSource tileSource)
|
||||
private static async Task LoadTile(Tile tile, TileSource tileSource)
|
||||
{
|
||||
var image = await tileSource.LoadImageAsync(tile.XIndex, tile.Y, tile.ZoomLevel).ConfigureAwait(false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue