【问题标题】:iOS CLGeocode address dictionaryiOS CLGeocode 地址字典
【发布时间】:2013-03-15 19:06:36
【问题描述】:

我正在尝试使用 CLGeocoder 对地址进行反向地理编码,并希望以编程方式创建地址字典以用于地理编码。我怎样才能做到这一点?我在上面找不到任何东西!谢谢。

【问题讨论】:

  • 好吧,我刚试过这个: NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"xxxx", kABPersonAddressProperty, @"12345", kABPersonAddressStreetKey, @"6789", kABPersonAddressCityKey, @"10123", kABPersonAddressStateKey,零];它没有工作。
  • 那么是什么让您在问题中包含该 sn-p?
  • “没用”是什么意思。很乐意提供帮助,但您的问题需要一些工作。您是否尝试过使用真实值而不是您发布的垃圾值的字典?

标签: ios dictionary geocode clgeocoder


【解决方案1】:

CLGeocoder 头文件中的文档为您提供所需的信息:

// 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 <AddressBook/ABPerson.h>.

- (void)geocodeAddressDictionary:(NSDictionary *)addressDictionary completionHandler:(CLGeocodeCompletionHandler)completionHandler;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-27
    • 2011-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多