【发布时间】:2010-05-11 13:05:07
【问题描述】:
我是 iPhone 开发的新手。我想知道 CLLocationManager 在确定当前位置时的工作过程。我已经使用下面的按钮事件代码来查找当前位置。
self.locationManager = [[[CLLocationManager alloc] init] autorelease];
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
[locationManager startUpdatingLocation];
输入
- (void)locationManager: (CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{ }
我已经确定了纬度和经度值并加载了当前位置。
它工作正常。如果更新到新位置后,是否会再次调用获取当前位置?如果 iPhone 无法找到当前位置,是否会再次搜索当前位置?
我想知道这两种情况
如果 iPhone 确定当前位置。
如果 iPhone 无法确定当前位置。
【问题讨论】:
标签: iphone geolocation maps