Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Google Maps API



Dave M G wrote:
I'm wondering if it has a way I can exploit it's location data so I can take user input in the form of the word "Tokyo", and get back a latitude and longitude coordinate to store in my database.

I've done exactly this. It's really really easy. Send a query to http://maps.google.com/maps/geo?q=Tokyo&output=csv&key=$key

You'll get back

200,1,35.678451,139.682282

First number is HTTP status, second number is accuracy (http://code.google.com/apis/maps/documentation/reference.html#GGeoAddressAccuracy)
and the last two are lat and long.


--
IDIOCY:
    Never Underestimate The Power Of Stupid People In Large Groups

                                                    http://www.despair.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links