/* * CLGeocoder.h * CoreLocation * * Copyright (c) 2010 Apple Inc. All rights reserved. */ #import #import #import @class CLRegion; @class CLPlacemark; @class CLGeocoderInternal; // geocoding handler, CLPlacemarks are provided in order of most confident to least confident typedef void (^CLGeocodeCompletionHandler)(NSArray *placemarks, NSError *error); NS_CLASS_AVAILABLE(10_8,5_0) @interface CLGeocoder : NSObject { @private CLGeocoderInternal *_internal; } @property (nonatomic, readonly, getter=isGeocoding) BOOL geocoding; // reverse geocode requests - (void)reverseGeocodeLocation:(CLLocation *)location completionHandler:(CLGeocodeCompletionHandler)completionHandler; // forward geocode requests // geocodeAddressDictionary:completionHandler: takes an address dictionary as defined by the AddressBook framework. // You can obtain an address dictionary from an ABPerson by retrieving the kABPersonAddressProperty property. // Alternately, one can be constructed using the kABPersonAddress* keys defined in . - (void)geocodeAddressDictionary:(NSDictionary *)addressDictionary completionHandler:(CLGeocodeCompletionHandler)completionHandler; - (void)geocodeAddressString:(NSString *)addressString completionHandler:(CLGeocodeCompletionHandler)completionHandler; - (void)geocodeAddressString:(NSString *)addressString inRegion:(CLRegion *)region completionHandler:(CLGeocodeCompletionHandler)completionHandler; - (void)cancelGeocode; @end