What steps will reproduce the problem? 1. load //www.google.com/jsapi 2. To use geolocation, inspect the ClientLocation object 3. read google.loader.ClientLocation.latitude
What is the expected output? What do you see instead?
It should return a rough approximation of the latitude, determined by google's ip-geolocation. Error. google.loader.ClientLocation is null.
What version of the product are you using? On what operating system?
Requesting the file via Chrome 13.
Comment #1
Posted on May 25, 2011 by Grumpy Rhino(No comment was entered for this change.)
Comment #2
Posted on May 25, 2011 by Quick MonkeyClientLocation returns null when it doesn't have information about your location. Unfortunately, we are unable to ensure that a valid location is always returned.
Instead of using ClientLocation, we recommend that you use the geo-location capabilities built into many modern browsers.
Comment #3
Posted on Jan 8, 2013 by Happy ElephantHello, I would like to know if google.loader.ClientLocation is still supported by Google or if we should now use HTML geo location capabilities. I have tried many websites codes and it does not work. Where should we register so that it works ? is there some subscription or API Key ? where to find the information ?
Thanks
Comment #4
Posted on Jan 8, 2013 by Quick MonkeyFor best results, you should use the HTML geolocation capabilities, which is provided by most modern browsers.
Comment #5
Posted on Jan 8, 2013 by Happy ElephantHello, Thanks for rapid answer. Is there some official announcement of the retirement of this API ?
Comment #6
Posted on Jan 9, 2013 by Quick MonkeyThe geolocation functionality in the Loader hasn't been retired, per se. We stopped documenting it several years ago and have recommended the HTML-based solutions due to their improved accuracy, but the functionality itself has not been removed from the Loader at this time. Thanks!
Comment #7
Posted on Jun 3, 2013 by Happy GiraffeComment deleted
Comment #8
Posted on Jun 3, 2013 by Happy GiraffeHI , Hi, Instead of google.loader.ClientLocation i used html5 navigator , it works fine. But it is opening dialog and asking for users to share his location. Is there any way to restrict that dialog box, basically when user opens application it should show users current location without asking sharing of users location. Could please guide me on this.
Thanks, Ram
Comment #9
Posted on Aug 6, 2013 by Quick MonkeyComment deleted
Comment #10
Posted on Aug 6, 2013 by Quick MonkeyDepends on a user's privacy settings. If the "Allow all sites to track my physical location" is set by a user, there will not be any dialog. You have no way to change this setting through your application. See https://support.google.com/chrome/answer/142065?hl=en http://www.mozilla.org/en-US/firefox/geolocation/
Comment #11
Posted on Oct 23, 2013 by Happy HippoI am unable to get country name returned by javascript on server side using asp.net. Using Google API i have generated the country name in label. I am not able to retrieve the country name in the server side.Please solve this problem.
- geolocation.txt 3.14KB
Status: WontFix
Labels:
Type-Defect
APIType-Loader