
Simple hack of Google's JS API to geo-locate your users for free - dsiroker
Just realized that when you fetch Google's JS API it will include your geo-location embedded in the javascript file it returns. You can verify this by just going to http://www.google.com/jsapi in your browser and looking at google.loader.ClientLocation<p>You can use this easily in any javascript code you write with the following snippet:<p>&#60;script src="http://www.google.com/jsapi"&#62;&#60;/script&#62;
&#60;script&#62;
  alert("I love living in: " + google.loader.ClientLocation.address.city);
&#60;/script&#62;
======
growt
I don't think this is a hack. it's documented api behavior:
[http://code.google.com/apis/ajax/documentation/#ClientLocati...](http://code.google.com/apis/ajax/documentation/#ClientLocation)

~~~
mcherm
It may not be a "hack", but I wasn't aware of it, so it's interesting
information anyway.

------
charliepark
This is a really neat hack. Thanks for sharing this.

