Description

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.

Access is via a global navigator.compass object.

Although the object is attached to the global scoped navigator, it is not available until after the deviceready event.

Browser Quirks

Values for current heading are randomly generated in order to simulate the compass.

iOS Quirks

Only one watchHeading can be in effect at one time in iOS. If a
watchHeading uses a filter, calling getCurrentHeading or
watchHeading uses the existing filter value to specify heading
changes. Watching heading changes with a filter is more efficient than
with time intervals.