Last active
May 16, 2016 09:55
-
-
Save jraanamo/9a70c45df1324508a2ec34ea4d06ab72 to your computer and use it in GitHub Desktop.
This file contains 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
// onSuccess Callback | |
// This method accepts a Position object, which contains the | |
// current GPS coordinates | |
// | |
var onSuccess = function(position) { | |
alert('Latitude: ' + position.coords.latitude + '\n' + | |
'Longitude: ' + position.coords.longitude + '\n' + | |
'Altitude: ' + position.coords.altitude + '\n' + | |
'Accuracy: ' + position.coords.accuracy + '\n' + | |
'Heading: ' + position.coords.heading + '\n' + | |
'floor: ' + position.coords.floor + '\n' + | |
'Timestamp: ' + position.timestamp + '\n'); | |
}; | |
// onError Callback receives a PositionError object | |
// | |
function onError(error) { | |
alert('code: ' + error.code + '\n' + | |
'message: ' + error.message + '\n'); | |
} | |
IndoorAtlas.getCurrentPosition(onSuccess, onError); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment