void LocationMonitorHeading(int flag);
Turns heading monitoring on or off.
Setting to determine whether heading monitoring should be on or off. (0 = off; 1 = on)
LocationMonitorHeading() turns heading monitoring on or off. When location monitoring is turned on, the user will be presented with an alert stating that the application wants to know the device's current location. At this point, the user may opt to disallow location monitoring.
Heading monitoring is turned on implicitly by LocationGetHeading(). If you wish to turn off heading monitoring, it is up to you to do so.
NOTE: this function is effective on the device only.
Available in DragonFireSDK 1.4 and later on devices with a magnetometer.
// Begin monitoring heading
MyFont = FontAdd("Helvetica", "Regular", 24, 0x00FF00);
HeadingText = TextAdd(10, 10, "Heading:", MyFont);
heading = LocationGetHeading();
sprintf(TextBuffer, "Heading: %f degrees", heading);