/// <summary> /// Create a geographic circle object for the given position and radius. /// </summary> /// <param name="position"></param> /// <param name="radius"></param> public Geocircle(BasicGeoposition position, double radius) { #if WINDOWS_UWP || WINDOWS_APP || WINDOWS_PHONE_APP || WINDOWS_PHONE _circle = new Windows.Devices.Geolocation.Geocircle(position, radius); #else _position = position; _radius = radius; #endif }
/// <summary> /// Returns the distance between the latitude and longitude coordinates that are specified by this <see cref="BasicGeoposition"/> and another specified <see cref="BasicGeoposition"/>. /// </summary> /// <param name="b"></param> /// <param name="other">The <see cref="BasicGeoposition"/> for the location to calculate the distance to.</param> /// <returns>The distance between the two coordinates, in meters.</returns> public static double GetDistanceTo(this BasicGeoposition b, BasicGeoposition other) { return(GetDistance(b.Latitude, b.Longitude, other.Latitude, other.Longitude)); }
/// <summary> /// Returns the distance between the latitude and longitude coordinates that are specified by this <see cref="BasicGeoposition"/> and another specified <see cref="BasicGeoposition"/>. /// </summary> /// <param name="b"></param> /// <param name="other">The <see cref="BasicGeoposition"/> for the location to calculate the distance to.</param> /// <returns>The distance between the two coordinates, in meters.</returns> public static double GetDistanceTo(this BasicGeoposition b, BasicGeoposition other) { return GetDistance(b.Latitude, b.Longitude, other.Latitude, other.Longitude); }