mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Remove Task.Run in ImageLoader.LoadImageAsync
This commit is contained in:
parent
edcdeb09c1
commit
f03a627a86
3 changed files with 10 additions and 16 deletions
|
|
@ -132,12 +132,11 @@ namespace MapControl
|
|||
var file = Path.GetFileNameWithoutExtension(sourcePath);
|
||||
var worldFilePath = Path.Combine(dir, file + ext.Remove(2, 1) + "w");
|
||||
|
||||
if (File.Exists(worldFilePath))
|
||||
if (await ImageLoader.LoadImageAsync(sourcePath) is BitmapSource bitmap)
|
||||
{
|
||||
return new GeoBitmap(
|
||||
(BitmapSource)await ImageLoader.LoadImageAsync(sourcePath),
|
||||
await ReadWorldFileMatrix(worldFilePath),
|
||||
null);
|
||||
var transform = await ReadWorldFileMatrix(worldFilePath);
|
||||
|
||||
return new GeoBitmap(bitmap, transform, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue