public static OpenWeatherMapResult GetWeatherInformationForLocation(double latitude, double longitude) { var geolocation = ReverseGeoLookup.ReverseGeoLoc(latitude, longitude); String response = GetHelper(DECODERURLStart + geolocation.results[0].formatted_address + DECODERURLEnd); OpenWeatherMapResult result = JSONHelper.Deserialize <OpenWeatherMapResult>(response); return(result); }
public static WeatherInformation GetWeatherInformationForLocation(double latitude, double longitude) { try { var geolocation = ReverseGeoLookup.ReverseGeoLoc(latitude, longitude); System.Threading.Thread.Sleep(3000); String response = GetHelper(DECODERURLStart + geolocation.results[0].formatted_address + DECODEURLEND); YahooResult yahooResult = JSONHelper.Deserialize <YahooResult>(response); return(new WeatherInformation() { Channel = yahooResult.query.results.channel }); } catch (Exception e) { throw e; } }