mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
MapPanel, MapPath location coercion
This commit is contained in:
parent
27729bf06c
commit
5a3e711171
2 changed files with 3 additions and 9 deletions
|
|
@ -86,13 +86,7 @@ namespace MapControl
|
|||
|
||||
if (position.HasValue && !parentMap.InsideViewport(position.Value))
|
||||
{
|
||||
var coercedLongitude = parentMap.CoerceLongitude(location.Longitude);
|
||||
var coercedPosition = parentMap.LocationToView(new Location(location.Latitude, coercedLongitude));
|
||||
|
||||
if (coercedPosition.HasValue && parentMap.InsideViewport(coercedPosition.Value))
|
||||
{
|
||||
longitudeOffset = coercedLongitude - location.Longitude;
|
||||
}
|
||||
longitudeOffset = parentMap.CoerceLongitude(location.Longitude) - location.Longitude;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue