Skip to content

Instantly share code, notes, and snippets.

@karanrajs
Last active August 8, 2016 03:06
Show Gist options
  • Save karanrajs/0fa81043cca1e601aab34969162cbb75 to your computer and use it in GitHub Desktop.
Save karanrajs/0fa81043cca1e601aab34969162cbb75 to your computer and use it in GitHub Desktop.
doinit : function(component, event, helper) {
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position){
component.set("v.comLat",position.coords.latitude);
component.set("v.comLong",position.coords.longitude);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment