The basic information to describe a geographic position.
PlatformVersion supported iOSiOS 9.0 and later macOSOS X 10.7 and later tvOStvOS 9.0 and later Windows UWPWindows 10 Windows StoreWindows 8.1 or later Windows Phone StoreWindows Phone 8.1 or later Windows Phone SilverlightWindows Phone 8.0 or later
Ejemplo n.º 1
0
        /// <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
        }
Ejemplo n.º 2
0
 /// <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);
 }