예제 #1
0
 public static GeoCoordinateBox ConvertFrom(this bound bound)
 {
     if (bound == null)
     {
         return((GeoCoordinateBox)null);
     }
     string[] strArray = bound.box.Split(',');
     return(new GeoCoordinateBox(new GeoCoordinate(double.Parse(strArray[0], (IFormatProvider)CultureInfo.InvariantCulture), double.Parse(strArray[1], (IFormatProvider)CultureInfo.InvariantCulture)), new GeoCoordinate(double.Parse(strArray[2], (IFormatProvider)CultureInfo.InvariantCulture), double.Parse(strArray[3], (IFormatProvider)CultureInfo.InvariantCulture))));
 }
예제 #2
0
 /// <summary>
 /// Extensions method for a bound.
 /// </summary>
 /// <returns></returns>
 public static GeoCoordinateBox ConvertFrom(this bound bound)
 {
     if (bound != null)
     {
         string[] bounds = bound.box.Split(',');
         return(new GeoCoordinateBox(
                    new GeoCoordinate(double.Parse(bounds[0], CultureInfo.InvariantCulture),
                                      double.Parse(bounds[1], CultureInfo.InvariantCulture)),
                    new GeoCoordinate(double.Parse(bounds[2], CultureInfo.InvariantCulture),
                                      double.Parse(bounds[3], CultureInfo.InvariantCulture))));
     }
     return(null);
 }