1

我正在使用 Androids FusedLocationApi 定期接收位置更新并在 GoogleMaps 上显示当前位置。
我知道准确性有时会不准确,因此在我走在街上的路上会大吃一惊。

LocationRequest locationRequest = new LocationRequest();
locationRequest.setInterval(5 * 1000);
locationRequest.setFastestInterval(2 * 1000);
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
locationRequest.setSmallestDisplacement(5);

LocationServices.FusedLocationApi.requestLocationUpdates(this.mGoogleApiClient, locationRequest, this);

静止不动时,有时我会静止不动,位置精度高且位置错误(是的,这很正常,我知道这一点)。
但 GoogleMaps不会更改位置标记,而是会更新该点周围的精度半径。

那么我怎么知道我什么时候应该真正将标记移动到下一个位置,而不是每次更新都移动(什么会在建筑物中产生很多跳跃)?并非每个位置都有可供使用的速度值。

任何人解决了这个问题并解决了它?

4

0 回答 0