/// <summary> /// At a regular interval, get the compass heading in degrees. /// </summary> /// <param name="compassSuccess">onSuccess callback function that provides the compass heading information via a compassHeading object.</param> /// <param name="compassError">onError callback function for compass functions.</param> /// <param name="compassOptions">An optional parameter to customize the retrieval of the compass.</param> /// <example> /// uage /// <code> /// function onSuccess(heading) { /// var element = document.getElementById('heading'); /// element.innerHTML = 'Heading: ' + heading.magneticHeading; ///}; ///function onError(compassError) { /// alert('Compass error: ' + compassError.code); ///}; ///var options = { frequency: 3000 }; // Update every 3 seconds ///var watchID = navigator.compass.watchHeading(onSuccess, onError, options); /// </code> /// </example> public JsString watchHeading(compassSuccess compassSuccess, CompassError compassError, CompassOptions compassOptions) { return null; }
/// <summary> /// The compass is a sensor that detects the direction or heading that the device is pointed. It measures the heading in degrees from 0 to 359.99. /// The compass heading information is returned via a CompassHeading object using the compassSuccess callback function. /// </summary> /// <param name="compassSuccess">onSuccess callback function that provides the compass heading information via a compassHeading object.</param> /// <param name="compassError">onError callback function for compass functions.</param> /// <param name="compassOptions">An optional parameter to customize the retrieval of the compass.</param> /// <example> /// uage /// <code> /// function onSuccess(heading) { /// // alert('Heading: ' + heading.magneticHeading); /// //}; /// //function onError(error) { /// // alert('CompassError: ' + error.code); /// //}; /// //navigator.compass.getCurrentHeading(onSuccess, onError); /// </code> /// </example> public void getCurrentHeading(compassSuccess compassSuccess, CompassError compassError, CompassOptions compassOptions) { }