Пример #1
0
 internal static Bind BuildBind(this Geocoding.IGeocoder geocoder, Location location)
 {
     try
     {
         IEnumerable<Address> addresses = geocoder.ReverseGeocode(location);
         return Bind.Create(location, addresses);
     }
     catch (Exception ex)
     {
         return Bind.Create(location.ToString(), ex);
     }
 }
Пример #2
0
 internal static Bind BuildBind(Geocoding.IGeocoder geocoder, Location location)
 {
     try
     {
         IEnumerable <Address> addresses = (geocoder as Geocoding.Google.GoogleGeocoder).ReverseGeocode(location);
         return(Bind.Create(location, addresses));
     }
     catch (Exception ex)
     {
         return(Bind.Create(location.ToString(), ex));
     }
 }
Пример #3
0
 internal static Bind BuildBind(this Geocoding.IGeocoder geocoder, string address)
 {
     if (Geocoding.Location.TryParse(address, out Geocoding.Location location))
         return BuildBind(geocoder, location);
     else
     {
         try
         {
             IEnumerable<Address> addresses = geocoder.Geocode(address);
             return Bind.Create(address, addresses);
         }
         catch (Exception ex)
         {
             return Bind.Create(address, ex);
         }
     }
 }
Пример #4
0
 public LinesExcelReader(string excelFile, Geocoding.IGeocoder coder)
 {
     this.excelFile = excelFile;
     this._geocoder = coder;
 }