This plugin provides access to the device's compass. The compass is a sensor that detects the direction or heading that the device is pointed, typically from the top of the device. It measures the heading in degrees from 0 to 359.99, where 0 is north.
Stop watching the compass referenced by the watch ID parameter.
The ID returned by navigator.compass.watchHeading.
Get the current compass heading. The compass heading is returned via a CompassHeading object using the onSuccess callback function.
Success callback that passes CompassHeading object.
Error callback that passes CompassError object.
Gets the device's current heading at a regular interval. Each time the heading is retrieved, the headingSuccess callback function is executed. The returned watch ID references the compass watch interval. The watch ID can be used with navigator.compass.clearWatch to stop watching the navigator.compass.
Success callback that passes CompassHeading object.
Error callback that passes CompassError object.
CompassOptions object
number