Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created November 2, 2009 11:47
Show Gist options
  • Save Sutto/224105 to your computer and use it in GitHub Desktop.
Save Sutto/224105 to your computer and use it in GitHub Desktop.
function getPosition() {
if($('form#plan-journey').length > 0) {
// native support via the W3C Spec
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(revGeocode);
// support via the wrapper
} else if(geo_position_js.init()) {
geo_position_js.getCurrentPosition(revGeocode);
// nothing available
} else {
console.log("I know nothing");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment