Created
March 14, 2012 19:44
-
-
Save mrpollo/2038949 to your computer and use it in GitHub Desktop.
Get the coordinates of your geolocation coordinates
This file contains hidden or 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
| 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