0

是否可以利用 Apple 的地点信息,甚至可以使用 MapKit 参考?

在Location Awareness Programming Guide上没有找到任何东西。尝试使用 MKPlacemark 匹配地址详细信息,例如

    MKPlacemark* placeMark = [[MKPlacemark alloc] initWithCoordinate:coordinate addressDictionary:@{
                                           (NSString *)kABPersonAddressStreetKey:@"113 Buccleuch Street",
                                             (NSString *)kABPersonAddressCityKey:@"Edinburgh",
                                            (NSString *)kABPersonAddressStateKey:@"UK",
                                              (NSString *)kABPersonAddressZIPKey:@"EH8 9",
                                          (NSString *)kABPersonAddressCountryKey:@"United Kingdom",
                                      (NSString *)kABPersonAddressCountryCodeKey:@"GB",
                              }];


    MKMapItem* mapItem =  [[MKMapItem alloc] initWithPlacemark:placeMark];
    mapItem.name = @"Coyaba";

但似乎纬度/经度优先于地址。

4

2 回答 2

1

我认为新的(iOS 6.1+)MKLocalSearch最适合你想要的。它将使用自然语言搜索模式找到兴趣点。

我认为没有任何方法可以像在 Apple Maps 应用程序中那样请求所有兴趣点或检索“可点击对象”。许多对象来自 Yelp,因此您可以查看它们是否提供 API。

于 2013-03-23T16:40:07.003 回答
0

您是否尝试过地理编码示例?下载下来试试看。。

于 2013-03-23T16:07:15.707 回答