Phonegap GPS无互联网 [英] Phonegap GPS without internet
问题描述
我试图做一个Android应用程序计数距离从
日志,lan值与phonegap.But phonegap GPS工作只有当互联网或wifi在
ON条件。如何可以获取日志,
I m trying to make an android app which count the distance traveled from log,lan values with phonegap.But phonegap GPS work only when internet or wifi in ON condition.How can get log ,lan values without internet by using geolocation api.Thanks in advance .
推荐答案
请参阅PhoneGap API文档 geolocation 下的geoLocationOptions:
See the PhoneGap API Docs for Geolocation under the geoLocationOptions:
Android Quirks
Android Quirks
Android 2.x模拟器不会返回地理位置结果,除非enableHighAccuracy选项设置为true。
The Android 2.x simulators will not return a geolocation result unless the enableHighAccuracy option is set to true.
{ enableHighAccuracy: true }
启用该选项将允许Android设备获取位置,即使WIFI选项已禁用。
Enabling that option will allow the Android device to get the location even with the WIFI option disabled.
这篇关于Phonegap GPS无互联网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!