Location information using Google api

Google Code Bloggoogle.loader.ClientLocation tells you the city, country, region, longitude and latitude based on the IP address of the client.

curl -i -s http://www.google.com/jsapi | grep ClientLocation
google.loader.ClientLocation = {”latitude”:18.567,”longitude”:73.967,”address”:{”city”:”",”region”:”Maharashtra”,”country”:”India”,”country_code”:”IN”}};
Use http://www.google.com/jsapi and you get location information for free.

3 Responses to “Location information using Google api”

Dopaweb (January 2nd, 2009 at 3:26 pm)

Thanks a lot for the post.
It’s easier than htpp://www.ip-to-country.com

xman (January 4th, 2009 at 9:58 am)

Doesn’t work for me – just returns NULL

Aman (January 4th, 2009 at 6:36 pm)

Are you using the function under a subnet ?

Leave your response!

Be nice. Keep it clean. Stay on topic. No spam.