mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-30 20:34:38 +01:00
Updated NearestLongitude
This commit is contained in:
parent
8233273779
commit
45b47bbae4
|
|
@ -313,6 +313,8 @@ namespace MapControl
|
|||
|
||||
internal double NearestLongitude(double longitude)
|
||||
{
|
||||
longitude = Location.NormalizeLongitude(longitude);
|
||||
|
||||
var offset = longitude - Center.Longitude;
|
||||
|
||||
if (offset > 180d)
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ namespace MapControl
|
|||
{
|
||||
var longitude = parentMap.NearestLongitude(location.Longitude);
|
||||
|
||||
if (longitude != location.Longitude)
|
||||
if (!location.LongitudeEquals(longitude))
|
||||
{
|
||||
position = parentMap.LocationToView(location.Latitude, longitude);
|
||||
}
|
||||
|
|
@ -243,7 +243,7 @@ namespace MapControl
|
|||
var location = parentMap.MapProjection.MapToLocation(center);
|
||||
var longitude = parentMap.NearestLongitude(location.Longitude);
|
||||
|
||||
if (longitude != location.Longitude)
|
||||
if (!location.LongitudeEquals(longitude))
|
||||
{
|
||||
position = parentMap.LocationToView(location.Latitude, longitude);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue