如何获得更稳定的位置而不是更准确的位置
我的应用程序使用FusedLocation -Provider API来检索用户当前位置,并使用以下代码每秒在地图上显示标记,
locationRequest = LocationRequest.create().apply {
interval = 1000
fastestInterval = 1000
priority = LocationRequest.PRIORITY_HIGH_ACCURACY
}
问题是我所获得的位置,只是不准确,因此标记器即使手机也没有移动。因此,在互联网上查看后,我发现Google说API准确性约为6-10米。因此,现在我想完成的是获得稳定的位置更新,如果仅估计它,这并不重要。重要的是要在地图上显示标记有点稳定。
my app uses the fusedlocationprovider api to retrieve the user current location and showing a marker on the map every second using the following code
locationRequest = LocationRequest.create().apply {
interval = 1000
fastestInterval = 1000
priority = LocationRequest.PRIORITY_HIGH_ACCURACY
}
the problem is that the location I am getting , just not that accurate so the marker keeps moving even the phone is not. so after looking on the internet I find out that google says that there api accuracy is about 6 - 10 meters . so now what I want to accomplish is to get a stable location update , it does not matter if it is only estimated . what's important is to show the marker a little bit steady on the map.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论