- Accelerometer
- Camera
- Capture
- Compass
- Connection
- Contacts
- Device
- Events
- File
- Geolocation
- Globalization
- InAppBrowser
- Media
- Notification
- Splashscreen
- Storage
- Overview
- Platform Guides
- The Cordova Command-line Interface
- Command-Line Usage
- Privacy Guide
- Upgrading Guides
- Project Settings
- Plugin Development Guide
- Domain Whitelist Guide
- Embedding WebView
This version of the documentation is outdated!
Click here for the latest released version.
compassSuccess
onSuccess callback function that provides the compass heading information via a [compassHeading](compassHeading.html)
object.
function(heading) {
// Do something
}
Parameters
- heading: The heading information. (compassHeading)
Example
function onSuccess(heading) {
alert('Heading: ' + heading.magneticHeading);
};