0
私は逆ジオコーダーを使用しています。私はSQLiteデータベースに情報を保存したいのですが、ユーザーが設定した緯度と経度が必要ですが、渡されません。 私は2つのダブルスは、緯度と経度と呼ばVAR持っていると私は以下のコードを実行すると、それは「ランダム」ダブルス使用しています:目的のCブロックにvarを渡します。
CLLocation *locate = [[CLLocation alloc] initWithLatitude:latitude longitude:longitude];
CLGeocoder *geoCoderCL = [[CLGeocoder alloc] init];
[geoCoderCL reverseGeocodeLocation: locate completionHandler:
^(NSArray *placemarks, NSError *error) {
CLPlacemark *placemark = [placemarks objectAtIndex:0];
Controller *mController = [[Controller alloc] init];
MyObject *newposition = [[Meeting alloc]init];
[newposition setLatitude:latitude];
[newposition setLongitude:longitude];
[newposition setMName:[NSString stringWithFormat:@"%@ %@",placemark.thoroughfare,placemark.subThoroughfare]];
NSLog(@"%@ %@",placemark.thoroughfare,placemark.subThoroughfare);
[mController createRecentPoint:newposition];
[mController release];
[newposition release];
}];
はどのようにこれを行うことになっているの?ありがとう。