router 2013-03-08
侦测设备屏幕朝向:
navigator.compass.getCurrentHeading(compassSuccess,compassError,compassOptions);
下面代码来自:cordova-2.0.0.js
var watchID = navigator.compass.watchHeading(compassSuccess,compassError,[compassOptions]);
navigator.compass.clearWatch(watchID);
var watchID = navigator.compass.watchHeadingFilter(compassSuccess,compassError,compassOptions);
navigator.compass.clearWatchFilter(watchID);