取得座標
locationMgr = [[CLLocationManager alloc] init];
locationMgr.delegate = self;
locationMgr.desiredAccuracy=kCLLocationAccuracyBest;
locationMgr.distanceFilter=0;
並於delegate實作
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
-(void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
透過google的geo將地址轉為address
http://maps.google.com/maps/geo?q=地址&output=格式&key=金鑰
地址:如台北市民生東路XX段XX號
格式:xml or csv
金鑰:google api金鑰
沒有留言:
張貼留言