mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 7.3.1
This commit is contained in:
parent
d8656c99a4
commit
3a43713bdd
27 changed files with 46 additions and 52 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue