mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MBTileSource.cs
This commit is contained in:
parent
65cf3b563f
commit
468a34dc1e
|
|
@ -29,7 +29,7 @@ namespace MapControl.MBTiles
|
||||||
{
|
{
|
||||||
Close();
|
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();
|
await connection.OpenAsync();
|
||||||
|
|
||||||
|
|
@ -73,9 +73,12 @@ namespace MapControl.MBTiles
|
||||||
|
|
||||||
var buffer = (byte[])await command.ExecuteScalarAsync();
|
var buffer = (byte[])await command.ExecuteScalarAsync();
|
||||||
|
|
||||||
|
if (buffer != null)
|
||||||
|
{
|
||||||
image = await LoadImageAsync(buffer);
|
image = await LoadImageAsync(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Logger?.LogError(ex, "LoadImageAsync");
|
Logger?.LogError(ex, "LoadImageAsync");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue