Created
July 17, 2013 12:08
-
-
Save jboulhous/6019987 to your computer and use it in GitHub Desktop.
Geolocation
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
successHandler = function(position){ | |
// position | |
console.log(position); | |
}; | |
errorHandler = function(error){ | |
// PositionError | |
console.log(error); | |
}; | |
options = { | |
enableHighAccuracy:false, | |
maximumAge:60000, | |
timeout:100000 | |
}; | |
navigator.geolocation.getCurrentPosition(successHandler,errorHandler,options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment