Version 7.3.1

This commit is contained in:
ClemensFischer 2022-11-04 23:46:54 +01:00
parent d8656c99a4
commit 3a43713bdd
27 changed files with 46 additions and 52 deletions

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -5,7 +5,7 @@
<RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control FileDbCache Library for WPF</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -7,7 +7,7 @@
<RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control FileDbCache Library for WinUI</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -5,7 +5,7 @@
<RootNamespace>MapControl.MBTiles</RootNamespace>
<AssemblyTitle>XAML Map Control MBTiles Library for WPF</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -7,7 +7,7 @@
<RootNamespace>MapControl.MBTiles</RootNamespace>
<AssemblyTitle>XAML Map Control MBTiles Library for WinUI</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -109,16 +109,12 @@ namespace MapControl
/// <summary>
/// Returns the view position of a Location.
/// </summary>
public Point? GetViewPosition(Location location)
public Point GetViewPosition(Location location)
{
if (location == null)
{
return null;
}
var position = parentMap.LocationToView(location);
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical && IsOutsideViewport(position))
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical &&
IsOutsideViewport(position))
{
location = new Location(location.Latitude, parentMap.ConstrainedLongitude(location.Longitude));
@ -144,9 +140,11 @@ namespace MapControl
var center = new Point(rect.X + rect.Width / 2d, rect.Y + rect.Height / 2d);
var position = parentMap.ViewTransform.MapToView(center);
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical && IsOutsideViewport(position))
if (parentMap.MapProjection.Type <= MapProjectionType.NormalCylindrical &&
IsOutsideViewport(position))
{
var location = parentMap.MapProjection.MapToLocation(center);
if (location != null)
{
location.Longitude = parentMap.ConstrainedLongitude(location.Longitude);
@ -207,7 +205,13 @@ namespace MapControl
{
foreach (var element in Children.OfType<FrameworkElement>())
{
var position = GetViewPosition(GetLocation(element));
Point? position = null;
var location = GetLocation(element);
if (location != null)
{
position = GetViewPosition(location);
}
SetViewPosition(element, position);

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -5,7 +5,7 @@
<RootNamespace>MapControl</RootNamespace>
<AssemblyTitle>XAML Map Control Library for WPF</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -7,7 +7,7 @@
<RootNamespace>MapControl</RootNamespace>
<AssemblyTitle>XAML Map Control Library for WinUI</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -5,7 +5,7 @@
<RootNamespace>MapControl.Projections</RootNamespace>
<AssemblyTitle>XAML Map Control Projections Library for WPF</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -7,7 +7,7 @@
<RootNamespace>MapControl.Projections</RootNamespace>
<AssemblyTitle>XAML Map Control Projections Library for WinUI</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -5,7 +5,7 @@
<RootNamespace>MapControl.UiTools</RootNamespace>
<AssemblyTitle>XAML Map Control UI Tools Library for WPF</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -7,7 +7,7 @@
<RootNamespace>MapControl.UiTools</RootNamespace>
<AssemblyTitle>XAML Map Control UI Tools Library for WinUI</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -5,7 +5,7 @@
<RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control SQLiteCache Library for WPF</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -7,7 +7,7 @@
<RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control SQLiteCache Library for WinUI</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<SignAssembly>true</SignAssembly>

View file

@ -6,7 +6,7 @@
<RootNamespace>ProjectionDemo</RootNamespace>
<AssemblyTitle>XAML Map Control Projection Demo Application</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
</PropertyGroup>

View file

@ -197,7 +197,7 @@
</tools:MapLayerItem>
<tools:MapLayersMenuButton.MapOverlays>
<tools:MapLayerItem Text="Sample Image">
<Image Source="10_535_330.jpg">
<Image Source="10_535_330.jpg" Stretch="Fill">
<map:MapPanel.BoundingBox>
<map:BoundingBox South="53.54031" West="8.08594" North="53.74871" East="8.43750"/>
</map:MapPanel.BoundingBox>

View file

@ -6,8 +6,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2022 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyVersion("7.3.1")]
[assembly: AssemblyFileVersion("7.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -204,7 +204,7 @@
</tools:MapLayerItem>
<tools:MapLayersMenuButton.MapOverlays>
<tools:MapLayerItem Text="Sample Image">
<Image Source="10_535_330.jpg">
<Image Source="10_535_330.jpg" Stretch="Fill">
<map:MapPanel.BoundingBox>
<map:BoundingBox South="53.54031" West="8.08594" North="53.74871" East="8.43750"/>
</map:MapPanel.BoundingBox>

View file

@ -11,7 +11,7 @@
<RootNamespace>SampleApplication</RootNamespace>
<AssemblyTitle>XAML Map Control WinUI Sample Application</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<AnalysisLevel>none</AnalysisLevel>

View file

@ -111,7 +111,6 @@
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11" MouseWheelZoomDelta="1"
Center="53.5,8.2"
MouseLeftButtonDown="MapMouseLeftButtonDown"
MouseRightButtonDown="MapMouseRightButtonDown"
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
ManipulationInertiaStarting="MapManipulationInertiaStarting">
@ -179,7 +178,8 @@
<tools:MapLayerItem Text="OpenStreetMap WMS" Layer="{StaticResource OpenStreetMapWMS}"/>
<tools:MapLayersMenuButton.MapOverlays>
<tools:MapLayerItem Text="Sample Image">
<Image Source="10_535_330.jpg" map:MapPanel.BoundingBox="53.54031,8.08594,53.74871,8.43750"/>
<Image Source="10_535_330.jpg" Stretch="Fill"
map:MapPanel.BoundingBox="53.54031,8.08594,53.74871,8.43750"/>
</tools:MapLayerItem>
<tools:MapLayerItem Text="Seamarks" Layer="{StaticResource Seamarks}"/>
<tools:MapLayerItem Text="Graticule">

View file

@ -78,20 +78,10 @@ namespace SampleApplication
{
if (e.ClickCount == 2)
{
//map.ZoomMap(e.GetPosition(map), Math.Floor(map.ZoomLevel + 1.5));
//map.ZoomToBounds(new BoundingBox(53, 7, 54, 9));
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
}
}
private void MapMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
if (e.ClickCount == 2)
{
//map.ZoomMap(e.GetPosition(map), Math.Ceiling(map.ZoomLevel - 1.5));
}
}
private void MapMouseMove(object sender, MouseEventArgs e)
{
var location = map.ViewToLocation(e.GetPosition(map));

View file

@ -6,7 +6,7 @@
<RootNamespace>SampleApplication</RootNamespace>
<AssemblyTitle>XAML Map Control WPF Sample Application</AssemblyTitle>
<Product>XAML Map Control</Product>
<Version>7.3.0</Version>
<Version>7.3.1</Version>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2022 Clemens Fischer</Copyright>
<DefineConstants></DefineConstants>