- Overview
 - The Command-line Interface
 - Platform Guides
 - Configuration Reference
 - Embedding WebViews
 - Plugin Development Guide
 - Privacy Guide
 - Domain Whitelist Guide
 - Accelerometer
 - Camera
 - Capture
 - Compass
 - Connection
 - Contacts
 - Device
 - Events
 - File
 - Geolocation
 - Globalization
 - InAppBrowser
 - Media
 - Notification
 - Splashscreen
 - Storage
 
                    
                    This version of the documentation is outdated!
                    
                        Click here for the latest released version.
                    
                
            
            
            
            geolocationSuccess
The user's callback function that executes when a geolocation position
becomes available (when called from [geolocation.getCurrentPosition](../geolocation.getCurrentPosition.html)),
or when the position changes (when called from
[geolocation.watchPosition](../geolocation.watchPosition.html)).
function(position) {
    // Do something
}
Parameters
- position: The geolocation position returned by the device. (Position)
 
Example
function geolocationSuccess(position) {
    alert('Latitude: '          + position.coords.latitude          + '\n' +
          'Longitude: '         + position.coords.longitude         + '\n' +
          'Altitude: '          + position.coords.altitude          + '\n' +
          'Accuracy: '          + position.coords.accuracy          + '\n' +
          'Altitude Accuracy: ' + position.coords.altitudeAccuracy  + '\n' +
          'Heading: '           + position.coords.heading           + '\n' +
          'Speed: '             + position.coords.speed             + '\n' +
          'Timestamp: '         + position.timestamp                + '\n');
}