Created
April 9, 2012 14:36
-
-
Save courtsimas/2343884 to your computer and use it in GitHub Desktop.
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
navigator.geolocation.getCurrentPosition(locationSuccess, locationFail); | |
function locationSuccess(position) { | |
latitude = position.coords.latitude; | |
longitude = position.coords.longitude; | |
} | |
function locationFail() { | |
alert(‘Oops, could not find you.’); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment