更新时间:2022-12-29 21:48:44
的的setInterval
方法并不精确。 这是文件中提及。
另外,使用相同的时间间隔 setFastestInterval
和的setInterval
来prevent您的应用程序接收位置更新比你的的setInterval
指定的时间间隔更快。
Also, use the same interval for setFastestInterval
and setInterval
to prevent your app from receiving location updates faster than the the interval you specified in setInterval
.
只需添加 REQUEST.setFastestInterval(有限区间);
你的 startPeriodicUpdates
法