Пример #1
0
        public static bounds ConvertTo(this GeoCoordinateBox box)
        {
            bounds bounds = new bounds();

            bounds.maxlat = box.MaxLat;
            int num1 = 1;

            bounds.maxlatSpecified = num1 != 0;
            double maxLon = box.MaxLon;

            bounds.maxlon = maxLon;
            int num2 = 1;

            bounds.maxlonSpecified = num2 != 0;
            double minLat = box.MinLat;

            bounds.minlat = minLat;
            int num3 = 1;

            bounds.minlatSpecified = num3 != 0;
            double minLon = box.MinLon;

            bounds.minlon = minLon;
            int num4 = 1;

            bounds.minlonSpecified = num4 != 0;
            return(bounds);
        }
Пример #2
0
 public static GeoCoordinateBox ConvertFrom(this bounds bounds)
 {
     if (bounds != null)
     {
         return(new GeoCoordinateBox(new GeoCoordinate(bounds.maxlat, bounds.maxlon), new GeoCoordinate(bounds.minlat, bounds.minlon)));
     }
     return((GeoCoordinateBox)null);
 }
Пример #3
0
        /// <summary>
        /// Extensions method for a geocoordinatebox.
        /// </summary>
        /// <param name="box"></param>
        /// <returns></returns>
        public static bounds ConvertTo(this GeoCoordinateBox box)
        {
            var b = new bounds();

            b.maxlat          = box.MaxLat;
            b.maxlatSpecified = true;
            b.maxlon          = box.MaxLon;
            b.maxlonSpecified = true;
            b.minlat          = box.MinLat;
            b.minlatSpecified = true;
            b.minlon          = box.MinLon;
            b.minlonSpecified = true;

            return(b);
        }
Пример #4
0
        /// <summary>
        /// Extensions method for a geocoordinatebox.
        /// </summary>
        /// <param name="box"></param>
        /// <returns></returns>
        public static bounds ConvertTo(this GeoCoordinateBox box)
        {
            bounds b = new bounds();

            b.maxlat = box.MaxLat;
            b.maxlatSpecified = true;
            b.maxlon = box.MaxLon;
            b.maxlonSpecified = true;
            b.minlat = box.MinLat;
            b.minlatSpecified = true;
            b.minlon = box.MinLon;
            b.minlonSpecified = true;

            return b;
        }