From d4f39c5cd9705771df8bcc7ed1aab3e717533d32 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Sun, 9 Mar 2025 21:40:37 +0100 Subject: [PATCH] Removed EnableMsixTooling --- Directory.Build.props | 3 +-- MBTiles/Shared/MBTileSource.cs | 4 +++- MapControl/Shared/ImageFileCache.cs | 7 +------ MapControl/Shared/MapGraticule.cs | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 19 deletions(-) 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