1 / 8
文档名称:

compass(指南针)phonegap中文api.doc

格式:doc   大小:86KB   页数:8页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

compass(指南针)phonegap中文api.doc

上传人:1373566119 2019/3/19 文件大小:86 KB

下载得到文件列表

compass(指南针)phonegap中文api.doc

相关文档

文档介绍

文档介绍:Commpass(指南针)获得该设备的方向指向。。);说明指南针是一种传感器,检测到的方向或标题,指出该设备。 它的措施,。ess 回调函数。ess(heading){  alert('Heading:'+heading);};functiononError(){  alert('onError!');};(ess,onError);完整的例子<!DOCTYPEHTMLPUBLIC"-//W3C////EN"           "/html4/"><html> <head>  <passExample</title>  <scripttype="text/javascript"charset="utf-8"src=""></script>  <scripttype="text/javascript"charset="utf-8">  //WaitforPhoneGaptoload  //  functiononLoad(){    ("deviceready",onDeviceReady,false);  }  //PhoneGapisready  //  functiononDeviceReady(){    (ess,onError);  }  //ess:Getthecurrentheading  //  ess(heading){    alert('Heading:'+heading);  }  //onError:Failedtogettheheading  //  functiononError(){    alert('onError!');  }  </script> </head> <bodyonload="onLoad()">  <h1>Example</h1>  <p>getCurrentHeading</p> </body></,获得指南针度标题。varwatchID=,[compassOptions]);说明指南针是一种传感器,检测到的方向或标题,指出该设备。 它的措施,。 获取设备的当前间隔在例行标题。 每次标题检索, ess 回调函数被执行。 通过指定的时间间隔以毫秒为单位 的频率 passOptions 对象。返回的手表ID引用引用指南针手表的时间间隔。  停止看指南针。ess(heading){  varelement=('heading');  ='Heading:'+heading;};functiononError(){  alert('onError!');};varoptions={frequency:3000}; //U