Last active
December 11, 2015 00:49
-
-
Save vbabiy/4519573 to your computer and use it in GitHub Desktop.
Get Location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
navigator.geolocation.getCurrentPosition(function(args) { | |
console.log(args.coords.latitude,args.coords.longitude) | |
}, function(error) { | |
console.error(error); | |
}); |
I've got that:
PositionError {message: "Network location provider at 'https://www.googleapis.com/' : Returned error code 404.", code: 2, PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3}
(anonymous function)
undefined
and below it gives me the coordinates which match with my location after checking with Google maps.
Still I don't get any results and the loading indicator keeps spinning.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I obtain that: (Chrome 24, Windows 7 x64)