headingChanged

Typemessage
DictionaryLCS
LibraryLiveCode Script
Syntax
headingChanged <pHeading>
Summary

Sent to the current card of the defaultStack when the heading of the device changes.

Introduced4.6.1
OSios, android
Platformsmobile
Parameters
NameTypeDescription
pHeading

The heading of the device, in degrees relative to true north if available, otherwise relative to magnetic north

Example
on headingChanged theHeading
   updateMapPosition theHeading
   -- update the marker on the map showing the current heading
end headingChanged
RelatedCommand: iphoneSetHeadingCalibrationTimeout
Function: mobileCanTrackHeading, mobileCanTrackLocation, mobileCurrentHeading, iphoneHeadingCalibrationTimeout
Message: trackingError
Description

Handle the headingChanged message if you want to perform tasks when the heading of the device changes.

The headingChanged message is sent to the current card of the defaultStack when the heading of the device changes.

If heading tracking cannot be started (typically due to a lack of calibration) then a trackingError message is sent instead.