PhoneGap的地理位置,code 3 - 超时过期不断某些Android设备上弹出 [英] phonegap geolocation, Code 3 - timeout expired keeps popping up on some Android Devices

查看:251
本文介绍了PhoneGap的地理位置,code 3 - 超时过期不断某些Android设备上弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的地理定位API的PhoneGap。我已经设置了enableHighAccuracy选项为true。 code 3,超时过期的选项保持雨后春笋般冒出来,但仅限于某些Android设备,并不止一次在使用应用程序。

I am using the PhoneGap API for geolocation. I have set the enableHighAccuracy Option to "true". Code 3, time out expired option keeps popping up, but only on some android devices and more than once while using the application.

请帮我...为什么会这样,它只能在某些Android设备出现故障。如果我设置精度为false,多少差异将我得到的检索坐标...

Please help me... Why is this so that it fails only on some android devices. If I set the accuracy to false, how much difference will I get in retrieving the coordinates...

推荐答案

设法解决了我的问题与下面的code:

Managed to resolve my issue with the code below:

var options = {maximumAge: 0, timeout: 10000, enableHighAccuracy:true};
navigator.geolocation.getCurrentPosition(onSuccess, onError, options);

看来,三星Galaxy手机不喜欢缓存GPS位置。

It seems that samsung galaxy phones do not like to cache the gps location.

这篇关于PhoneGap的地理位置,code 3 - 超时过期不断某些Android设备上弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆