Update MBTileSource.cs

This commit is contained in:
ClemensFischer 2025-08-31 14:47:47 +02:00
parent 65cf3b563f
commit 468a34dc1e

View file

@ -29,7 +29,7 @@ namespace MapControl.MBTiles
{
Close();
connection = new SQLiteConnection("Data Source=" + Path.GetFullPath(file) + ";Read Only=True");
connection = new SQLiteConnection("Data Source=" + FilePath.GetFullPath(file) + ";Read Only=True");
await connection.OpenAsync();
@ -73,9 +73,12 @@ namespace MapControl.MBTiles
var buffer = (byte[])await command.ExecuteScalarAsync();
if (buffer != null)
{
image = await LoadImageAsync(buffer);
}
}
}
catch (Exception ex)
{
Logger?.LogError(ex, "LoadImageAsync");