Skip to content

Instantly share code, notes, and snippets.

@mrpollo
Created March 14, 2012 19:44
Show Gist options
  • Select an option

  • Save mrpollo/2038949 to your computer and use it in GitHub Desktop.

Select an option

Save mrpollo/2038949 to your computer and use it in GitHub Desktop.
Get the coordinates of your geolocation coordinates
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
console.log(position);
}, function (msg) {
console.log(arguments);
});
} else {
console.log('not supported');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment