Removed EnableMsixTooling

This commit is contained in:
ClemensFischer 2025-03-09 21:40:37 +01:00
parent 37dac5611d
commit d4f39c5cd9
4 changed files with 15 additions and 19 deletions

View file

@ -3,7 +3,7 @@
<Product>XAML Map Control</Product> <Product>XAML Map Control</Product>
<Authors>Clemens Fischer</Authors> <Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2025 Clemens Fischer</Copyright> <Copyright>Copyright © 2025 Clemens Fischer</Copyright>
<Version>13.0.0</Version> <Version>13.0.1</Version>
<AssemblyVersion>$(Version)</AssemblyVersion> <AssemblyVersion>$(Version)</AssemblyVersion>
<AssemblyOriginatorKeyFile>..\..\MapControl.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>..\..\MapControl.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly> <SignAssembly>true</SignAssembly>
@ -11,7 +11,6 @@
<PackageTags>XAML WPF WinUI Avalonia Map OpenStreetMap</PackageTags> <PackageTags>XAML WPF WinUI Avalonia Map OpenStreetMap</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ClemensFischer/XAML-Map-Control</PackageProjectUrl> <PackageProjectUrl>https://github.com/ClemensFischer/XAML-Map-Control</PackageProjectUrl>
<EnableMsixTooling>true</EnableMsixTooling>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View file

@ -68,7 +68,9 @@ namespace MapControl.MBTiles
command.Parameters.AddWithValue("@x", x); command.Parameters.AddWithValue("@x", x);
command.Parameters.AddWithValue("@y", (1 << zoomLevel) - y - 1); 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) catch (Exception ex)

View file

@ -27,12 +27,7 @@ namespace MapControl.Caching
public ImageFileCache(string path, TimeSpan expirationScanFrequency) public ImageFileCache(string path, TimeSpan expirationScanFrequency)
{ {
if (string.IsNullOrEmpty(path)) rootDirectory = new DirectoryInfo(!string.IsNullOrEmpty(path) ? path : "TileCache");
{
path = "TileCache";
}
rootDirectory = new DirectoryInfo(path);
rootDirectory.Create(); rootDirectory.Create();
Debug.WriteLine($"{nameof(ImageFileCache)}: {rootDirectory.FullName}"); Debug.WriteLine($"{nameof(ImageFileCache)}: {rootDirectory.FullName}");

View file

@ -148,14 +148,14 @@ namespace MapControl
private void DrawCylindricalGraticule(PathFigureCollection figures, ICollection<Label> labels) private void DrawCylindricalGraticule(PathFigureCollection figures, ICollection<Label> labels)
{ {
var bounds = ParentMap.ViewRectToBoundingBox(new Rect(0, 0, ParentMap.ActualWidth, ParentMap.ActualHeight)); var boundingBox = ParentMap.ViewRectToBoundingBox(new Rect(0, 0, ParentMap.ActualWidth, ParentMap.ActualHeight));
var latLabelStart = Math.Ceiling(bounds.South / lineDistance) * lineDistance; var latLabelStart = Math.Ceiling(boundingBox.South / lineDistance) * lineDistance;
var lonLabelStart = Math.Ceiling(bounds.West / lineDistance) * lineDistance; var lonLabelStart = Math.Ceiling(boundingBox.West / lineDistance) * lineDistance;
for (var lat = latLabelStart; lat <= bounds.North; lat += lineDistance) for (var lat = latLabelStart; lat <= boundingBox.North; lat += lineDistance)
{ {
var p1 = ParentMap.LocationToView(new Location(lat, bounds.West)); var p1 = ParentMap.LocationToView(new Location(lat, boundingBox.West));
var p2 = ParentMap.LocationToView(new Location(lat, bounds.East)); var p2 = ParentMap.LocationToView(new Location(lat, boundingBox.East));
if (p1.HasValue && p2.HasValue) if (p1.HasValue && p2.HasValue)
{ {
@ -163,17 +163,17 @@ namespace MapControl
} }
} }
for (var lon = lonLabelStart; lon <= bounds.East; lon += lineDistance) for (var lon = lonLabelStart; lon <= boundingBox.East; lon += lineDistance)
{ {
var p1 = ParentMap.LocationToView(new Location(bounds.South, lon)); var p1 = ParentMap.LocationToView(new Location(boundingBox.South, lon));
var p2 = ParentMap.LocationToView(new Location(bounds.North, lon)); var p2 = ParentMap.LocationToView(new Location(boundingBox.North, lon));
if (p1.HasValue && p2.HasValue) if (p1.HasValue && p2.HasValue)
{ {
figures.Add(CreateLineFigure(p1.Value, p2.Value)); figures.Add(CreateLineFigure(p1.Value, p2.Value));
} }
for (var lat = latLabelStart; lat <= bounds.North; lat += lineDistance) for (var lat = latLabelStart; lat <= boundingBox.North; lat += lineDistance)
{ {
var location = new Location(lat, lon); var location = new Location(lat, lon);
var position = ParentMap.LocationToView(location); var position = ParentMap.LocationToView(location);