问题描述
我在我的应用中使用了显着位置更改功能,以便用户跟踪和保存位置。如果它在一个地方停留更长的时间进行跟踪 - 它仍然会注意到运动。这可能是由于手机更改了它所连接的手机信号塔。
有什么办法可以过滤掉 CLLocationManager
中的位置,即使您没有移动也能获取到位置?
func locationManager(_ manager: CLLocationManager,didUpdateLocations locations: [CLLocation]) {
guard locations.first?.timestamp != self.lastCoordinate else {
LocalLogger.location.info("Duplicate location recieved. Igoring")
return
}
self.lastCoordinate = locations.first?.timestamp
LocalLogger.location.log("Recieved Location")
for location in locations {
LocationManager.saveLocation(location: location)
}
LocationManager.startToMonitor(manager,delegate: self)
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)