Joe Torraca Joe Torraca - 1 month ago 15
PHP Question

PHP Latitude Longitude to Address

I have a form on my website where a user enters an address of a place. When they submit the form, I convert this location into latitude/longitude and store this in a MySQL Database. I am using Google's Geocode service for this conversion. The problem is that I can't find either a class or a service to convert that latitude/longitude back to an address and as far as I know, Google's Geocode service is a unidirectional conversion. I realize I could store the physical address in the database, but over time this is wasted space when it could be stored in a simpler format. Does anybody know of either a class/service to convert from latitude/longitude to a address or if I am wrong and I can use Google's geocode system? I have looked for the answer for the past few days but couldn't find anything. Thanks for your help!

Answer

You're looking for Google's (or anyone else's) reverse geocoding service.