Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. function alertFunc() {
  2. console.log('int')
  3. var latitude,longitude;
  4. navigator.geolocation.getCurrentPosition(function(position) {
  5. latitude = position.coords.latitude;
  6. longitude = position.coords.longitude;
  7. console.log(latitude);
  8. console.log(longitude);
  9.  
  10.  
  11. }, function(error) {
  12. alert('Unable to get location: ' + error.message);
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement