Cordova 地理定位精度上限为 10 米 [英] Cordova geolocation accuracy gets capped at 10 meters

查看:24
本文介绍了Cordova 地理定位精度上限为 10 米的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:这是一个 Google Play 服务问题,内部报告了这里将从 13.4.0 版本开始修复

Update: it is a Google Play Service issue, reported internally here and it will be fixed from version 13.4.0

我们使用 cordova 地理定位插件 和方法 navigator.geolocation.watchPosition() 带有选项 enableHighAccuracy: true 以跟踪用户位置并获得最准确的结果.

We use the cordova gelocation plugin and the method navigator.geolocation.watchPosition() with the option enableHighAccuracy: true to track the user location and get the most accurate results.

我们的应用程序已经推出 1 年多,我们过去没有任何问题,任何设备都能获得非常好的位置精度,在室外和天空晴朗时为 4/6 米.

Our app has been around for more than 1 year and we used to have no problems with any device getting a very good location accuracy, 4/6 meters when outside and the sky is clear.

最近,我们的许多用户报告说,无论他们做什么,都无法获得低于 10m 的准确度.

Lately, many of our users are reporting not being able to get anything less than 10m accuracy no matter what they do.

我们决定自己测试它,我们发现有同样的问题.最初,我们认为我们在最新版本中引入了一些错误,我们对所有内容进行了三次检查,但没有对涉及地理位置的代码/依赖项进行任何更改.

We decided to test it ourselves and we found to have the same issue. Initially, we thought we introduced some bug in our latest release, we triple checked everything but we made no changes to code/dependencies involving geolocation.

我们也测试了我们应用的旧版本,我们确信可以达到 4m 的准确度,但令人惊讶的是它们也不起作用,准确度上限为 10m.

We tested older versions of our app as well, where we are sure it was possible to get like 4m accuracy, but surprisingly they do not work either, accuracy is capped at 10m.

我们尝试了不同版本的 Android,我们可以在从 5 (Lollipop) 到 8 (Oreo) 的任何平台上重现该问题.我们在 iOS 10/11 上也有同样的问题.同样,我们已经几个月没有更新应用了.

We tried different version of Android and we can reproduce the issue on any platform from 5 (Lollipop) to 8 (Oreo). We also have the same problem on iOS 10/11. Again, we have not updated the app in months.

最近有一个关于同一问题的问题 这里:

There is a recent question about the same issue here:

其他人在使用 Android 本机代码时遇到了同样的问题 这里

Someone else is having the same problem using Android native code here

有谁知道这是怎么回事吗?是权限问题吗?定位服务也设置为高精度.

Does anyone know what is going on? Is it a permission issue? Location Services are set to High Accuracy as well.

为了完整起见,我们可以使用此 插件

For the sake of completeness, we are able to get 3/4 meters accuracy using the old version (2.x) of this plugin

这是唯一的出路吗?

我们宁愿不为开箱即用的东西引入额外的依赖.

We would rather not introduce an extra dependency for something that was working so well out of the box.

非常感谢

推荐答案

它可能关心的人,这是一个 Google Play 服务问题,内部报告 这里 它将从 13.4.0 版开始修复

To whom it might concern, it is a Google Play Services issue, reported internally here and it will be fixed from version 13.4.0

更新:更新到Play Services 14.3.66后解决,精度再次降到4m!

Update: solved after updating to Play Services 14.3.66, accuracy down to 4m again!

这篇关于Cordova 地理定位精度上限为 10 米的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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