location manager在iPhone中找到当前位置后是否会重复找到当前位置?
我是iPhone开发新手。我想知道CLLocationManager在确定当前位置时的工作流程。我使用下面的按钮事件代码来查找当前位置location manager在iPhone中找到当前位置后是否会重复找到当前位置?,iphone,geolocation,maps,Iphone,Geolocation,Maps,我是iPhone开发新手。我想知道CLLocationManager在确定当前位置时的工作流程。我使用下面的按钮事件代码来查找当前位置 self.locationManager = [[[CLLocationManager alloc] init] autorelease]; self.locationManager.delegate = self; // Tells the location manager to send updates to this object [location
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
[locationManager startUpdatingLocation];
在
我已经确定了lat和long值,并加载了当前位置
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
[locationManager startUpdatingLocation];
它工作得很好。如果在更新到新位置后,是否会再次调用它以获取当前位置?如果iPhone找不到当前位置,是否会再次搜索当前位置
我想知道这两种情况
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
[locationManager startUpdatingLocation];
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
[locationManager startUpdatingLocation];
根据
位置服务返回一个
尽可能快地确定初始位置
可能,返回缓存信息
如果可以的话。交货后
初始事件通知
CLLocationManager对象可能会传递
如果最小值为
阈值距离(按照
distanceFilter属性)为
超出或更准确的位置
价值是确定的
这似乎表明:(1)您可能会在缓存位置信息仍在尝试确定您当前位置时收到缓存位置信息,(2)您可能会收到多个更新,因为它可以更准确地确定位置