public void MoveToRegion(Plugin.Geolocator.Abstractions.Position position)
 {
     ClosestBankMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(position.Latitude, position.Longitude), Distance.FromKilometers(0.5)));
 }
예제 #2
0
 public static MapSpan FromCenterAndRadius(Position center, Distance radius)
 {
     return(new MapSpan(center, 2 * DistanceToLatitudeDegrees(radius), 2 * DistanceToLongitudeDegrees(center, radius)));
 }
예제 #3
0
 static double DistanceToLatitudeDegrees(Distance distance)
 {
     return(distance.Kilometers / EarthCircumferenceKm * 360);
 }
예제 #4
0
        static double DistanceToLongitudeDegrees(Position position, Distance distance)
        {
            double latCircumference = LatitudeCircumferenceKm(position);

            return(distance.Kilometers / latCircumference * 360);
        }