mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
GroundOverlay, ImageLoader
This commit is contained in:
parent
31b2e37b23
commit
3073cf1ef1
3 changed files with 37 additions and 45 deletions
|
|
@ -31,9 +31,12 @@ namespace MapControl
|
|||
HttpClient.DefaultRequestHeaders.Add("User-Agent", $"XAML-Map-Control/{typeof(ImageLoader).Assembly.GetName().Version}");
|
||||
}
|
||||
|
||||
public static Task<ImageSource> LoadImageAsync(byte[] buffer)
|
||||
public static async Task<ImageSource> LoadImageAsync(byte[] buffer)
|
||||
{
|
||||
return LoadImageAsync(new MemoryStream(buffer));
|
||||
using (var stream = new MemoryStream(buffer))
|
||||
{
|
||||
return await LoadImageAsync(stream);
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<ImageSource> LoadImageAsync(Uri uri, IProgress<double> progress = null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue