A couple of days Google released a new location API that lets you turn and address to GPS coordinates and vice versa. While you could do this using the Google Maps API this new way of doing it is a lot easier.
How It Works
This API is RESTful, you can get the data in two different formats, XML or JSON.
All you need to do is make a call to the the following URL.
From Address to Latitude and Longitude
Let’s get the latitude and longitude for "22 Cortlandt Street, New York, NY" in XML . Paste the following URL in your browser.
You actually get more than just the latitude and longitude, but the coordinates you want are in the <location> tag.
<location> <lat>40.7102640</lat> <lng>-74.0107080</lng> </location>
From GPS Coordinates to Address
To turn GPS coordinates back to an address you would replace &qout;address&qout; with "latlng&qout; and put the coordinates in that order separated by a coma. Let’s get our previous address using the location coordinates we just got.