デフォルトでは、マップ ビューにユーザーの位置を表示できます。注釈ピンをタップすると、「現在地」が表示されます。しかし、ユーザーの住所を通り、都市、国として表示したいと思います。CLGeoCoder
クラスを使用してそれを行うにはどうすればよいですか?
1733 次
1 に答える
6
次のようにします。
CLGeocoder *gc = [[[CLGeocoder alloc] init] autorelease];
[gc reverseGeocodeLocation:locationObject completionHandler:^(NSArray *placemark, NSError *error) {
CLPlacemark *pm = [placemark objectAtIndex:0];
NSDictionary *address = pm.addressDictionary;
// do something with the address, see keys in the remark below
}];
于 2012-01-19T19:06:08.720 に答える