mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update GeoImage.cs
This commit is contained in:
parent
5550556b9f
commit
52dc95c0e7
|
|
@ -132,11 +132,12 @@ namespace MapControl
|
|||
var file = Path.GetFileNameWithoutExtension(sourcePath);
|
||||
var worldFilePath = Path.Combine(dir, file + ext.Remove(2, 1) + "w");
|
||||
|
||||
if (await ImageLoader.LoadImageAsync(sourcePath) is BitmapSource bitmap)
|
||||
if (File.Exists(worldFilePath))
|
||||
{
|
||||
var transform = await ReadWorldFileMatrix(worldFilePath);
|
||||
|
||||
return new GeoBitmap(bitmap, transform, null);
|
||||
return new GeoBitmap(
|
||||
(BitmapSource)await ImageLoader.LoadImageAsync(sourcePath),
|
||||
await ReadWorldFileMatrix(worldFilePath),
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue