开发者

iPhone Mapkit: How can I get a real business name/address from a longitude/latitude?

开发者 https://www.devze.com 2022-12-26 03:59 出处:网络
I\'m writing an iPhone application and trying to determine how to find a business name/address from a user\'s current GPS location (longitude/latitude). For example, if someone if using the applicatio

I'm writing an iPhone application and trying to determine how to find a business name/address from a user's current GPS location (longitude/latitude). For example, if someone if using the application from inside a Starbucks, how can I find this out from their location? Is th开发者_如何学编程ere a way to do this using mapkit or any API/Webservice?


You can do this with MKReverseGeocoder by providing a MKReverseGeocoderDelegate. It's actually quite simple.

The delegate will give you all sorts of information as an MKPlacemark.


You can get an address (MKReverseGeocoder), but you can't get a business name using the iPhone native SDK. I believe that both Google and Bing provide APIs for this, but one that I like to use (and it may have the most momentum) is Foursquare's.

0

精彩评论

暂无评论...
验证码 换一张
取 消