diff --git a/Directory.Build.props b/Directory.Build.props index 4a7d8513..298e13bb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ XAML Map Control Clemens Fischer Copyright © 2025 Clemens Fischer - 13.0.0 + 13.0.1 $(Version) ..\..\MapControl.snk true @@ -11,7 +11,6 @@ XAML WPF WinUI Avalonia Map OpenStreetMap MIT https://github.com/ClemensFischer/XAML-Map-Control - true disable diff --git a/MBTiles/Shared/MBTileSource.cs b/MBTiles/Shared/MBTileSource.cs index 2efc02bf..457f3882 100644 --- a/MBTiles/Shared/MBTileSource.cs +++ b/MBTiles/Shared/MBTileSource.cs @@ -68,7 +68,9 @@ namespace MapControl.MBTiles command.Parameters.AddWithValue("@x", x); command.Parameters.AddWithValue("@y", (1 << zoomLevel) - y - 1); - image = await LoadImageAsync((byte[])await command.ExecuteScalarAsync()); + var buffer = (byte[])await command.ExecuteScalarAsync(); + + image = await LoadImageAsync(buffer); } } catch (Exception ex) diff --git a/MapControl/Shared/ImageFileCache.cs b/MapControl/Shared/ImageFileCache.cs index 33af9ee8..b4449ad2 100644 --- a/MapControl/Shared/ImageFileCache.cs +++ b/MapControl/Shared/ImageFileCache.cs @@ -27,12 +27,7 @@ namespace MapControl.Caching public ImageFileCache(string path, TimeSpan expirationScanFrequency) { - if (string.IsNullOrEmpty(path)) - { - path = "TileCache"; - } - - rootDirectory = new DirectoryInfo(path); + rootDirectory = new DirectoryInfo(!string.IsNullOrEmpty(path) ? path : "TileCache"); rootDirectory.Create(); Debug.WriteLine($"{nameof(ImageFileCache)}: {rootDirectory.FullName}"); diff --git a/MapControl/Shared/MapGraticule.cs b/MapControl/Shared/MapGraticule.cs index b7df2d24..89ff2b35 100644 --- a/MapControl/Shared/MapGraticule.cs +++ b/MapControl/Shared/MapGraticule.cs @@ -148,14 +148,14 @@ namespace MapControl private void DrawCylindricalGraticule(PathFigureCollection figures, ICollection