public IDictionary<String, String> getLatLong(String zipCode)
{
XmlDataDocument doc = new XmlDataDocument();
List<String> data = new List<String>();
String url = "http://maps.googleapis.com/maps/api/geocode/xml?address=" + zipCode;
doc.Load(url);
XmlNodeList status = doc.GetElementsByTagName("status");
String res_status = status[0].InnerText;
if (!res_status.Equals("OK"))
{
data.Add("No Result");
}
XmlNodeList result = doc.GetElementsByTagName("result");
XmlNodeList list = null,location = null;
String latitude = null, longitude = null;
for (int i = 0; i < result.Count; i++)
{
list = doc.GetElementsByTagName("geometry");
}
for (int i = 0; i < list.Count; i++)
{
location = doc.GetElementsByTagName("location");
}
latitude = location[0].SelectSingleNode("lat").InnerText;
longitude = location[0].SelectSingleNode("lng").InnerText;
return getWeatherData(latitude,longitude);
}