I have noticed a lot of information about how to get your location using Google geolocation looks, based on IP address. But I am wondering if and how I could use this service t
reverse geocoding: get address from latitude and longitude using google maps geocoding api in asp.net
protected void Page_Load(object sender, EventArgs e)
{
GetAddress("53.2734", "-7.77832031");
}
private string GetAddress(string latitude, string longitude)
{
string locationName = "";
string url = string.Format("http://maps.googleapis.com/maps/api/geocode/xml?latlng={0},{1}&sensor=false", latitude, longitude);
XElement xml = XElement.Load(url);
if (xml.Element("status").Value == "OK")
{
locationName = string.Format("{0}",
xml.Element("result").Element("formatted_address").Value);
Label1.Text = locationName;
}
return locationName;
}