- Overview
- Platform Support
- The Command-Line Interface
- Platform Guides
- Using Plugman to Manage Plugins
- The config.xml File
- Icons and Splash Screens
- Embedding WebViews
- Plugin Development Guide
- Privacy Guide
- Whitelist Guide
- Accelerometer
- Camera
- Capture
- Compass
- Connection
- Contacts
- Device
- Events
- File
- Geolocation
- Globalization
- InAppBrowser
- Media
- Notification
- Splashscreen
- Storage
compassHeading
A CompassHeading
object is returned to the [compassSuccess](compassSuccess.html)
callback function.
Properties
-
magneticHeading: The heading in degrees from 0-359.99 at a single moment in time. (Number)
-
trueHeading: The heading relative to the geographic North Pole in degrees 0-359.99 at a single moment in time. A negative value indicates that the true heading can't be determined. (Number)
-
headingAccuracy: The deviation in degrees between the reported heading and the true heading. (Number)
-
timestamp: The time at which this heading was determined. (milliseconds)
Description
The CompassHeading
object is returned to the [compassSuccess](compassSuccess.html)
callback function.
Amazon Fire OS Quirks
-
trueHeading
is not supported, but reports the same value asmagneticHeading
-
headingAccuracy
is always 0 because there is no difference between themagneticHeading
andtrueHeading
Android Quirks
-
The
trueHeading
property is not supported, but reports the same value asmagneticHeading
. -
The
headingAccuracy
property is always 0 because there is no difference between themagneticHeading
andtrueHeading
.
iOS Quirks
-
The
trueHeading
property is only returned for location services enabled vianavigator.geolocation.watchLocation()
. -
For iOS 4 devices and above, heading factors in the device's current orientation, and does not reference its absolute position, for apps that supports that orientation.