mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Location equality
This commit is contained in:
parent
1e13a3bffb
commit
7208cc71bd
9 changed files with 50 additions and 30 deletions
|
|
@ -205,12 +205,12 @@ namespace MapControl
|
|||
if (parentMap.MapProjection.IsNormalCylindrical &&
|
||||
position.HasValue && !parentMap.InsideViewBounds(position.Value))
|
||||
{
|
||||
var coercedPosition = parentMap.LocationToView(
|
||||
location.Latitude, parentMap.CoerceLongitude(location.Longitude));
|
||||
var nearestPosition = parentMap.LocationToView(
|
||||
location.Latitude, parentMap.NearestLongitude(location.Longitude));
|
||||
|
||||
if (coercedPosition.HasValue)
|
||||
if (nearestPosition.HasValue)
|
||||
{
|
||||
position = coercedPosition;
|
||||
position = nearestPosition;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -229,12 +229,12 @@ namespace MapControl
|
|||
|
||||
if (location != null)
|
||||
{
|
||||
var coercedPosition = parentMap.LocationToView(
|
||||
location.Latitude, parentMap.CoerceLongitude(location.Longitude));
|
||||
var nearestPosition = parentMap.LocationToView(
|
||||
location.Latitude, parentMap.NearestLongitude(location.Longitude));
|
||||
|
||||
if (coercedPosition.HasValue)
|
||||
if (nearestPosition.HasValue)
|
||||
{
|
||||
position = coercedPosition.Value;
|
||||
position = nearestPosition.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue