Skip to content

Instantly share code, notes, and snippets.

@jboulhous
Created July 17, 2013 12:08
Show Gist options
  • Save jboulhous/6019987 to your computer and use it in GitHub Desktop.
Save jboulhous/6019987 to your computer and use it in GitHub Desktop.
Geolocation
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