Moved method from TileImageLoader to TileSource

This commit is contained in:
ClemensFischer 2025-01-17 07:05:03 +01:00
parent fa160ff138
commit 7cb7d81f15
2 changed files with 9 additions and 5 deletions

View file

@ -75,7 +75,7 @@ namespace MapControl
/// <summary>
/// Loads a tile ImageSource asynchronously from GetUri(column, row, zoomLevel).
/// This method is called by TileImageLoader for TileSources without caching.
/// This method is called by TileImageLoader when caching is disabled.
/// </summary>
public virtual Task<ImageSource> LoadImageAsync(int column, int row, int zoomLevel)
{
@ -84,6 +84,12 @@ namespace MapControl
return uri != null ? ImageLoader.LoadImageAsync(uri) : Task.FromResult((ImageSource)null);
}
/// <summary>
/// Loads a tile ImageSource asynchronously from an encoded frame buffer in a byte array.
/// This method is called by TileImageLoader when caching is enabled.
/// </summary>
public virtual Task<ImageSource> LoadImageAsync(byte[] buffer) => ImageLoader.LoadImageAsync(buffer);
/// <summary>
/// Creates a TileSource instance from an Uri template string.
/// </summary>