开发者

How to get address and phone numbers using MKReverseGeocoder in iPhone

开发者 https://www.devze.com 2023-03-17 18:06 出处:网络
Is this posible to get the users current location with address and contact information(phone number).

Is this posible to get the users current location with address and contact information(phone number). I have used CLLocationManager to get the current lo开发者_开发技巧cation of the user and the tried to get the address and other detail using google API, in the response I am getting current location's detail. But there is no contact information.

Like if user is currently visiting walmart or any other famous location then we can get their store's phone numbers or not?

Please tell me that, Can we get the phone numbers using google API or not?

Thanks


If you can, it would be passed to you in the MKPlacemark that is sent to the MKReverseGeocoder delegate you have specified.

There is an "addressDictionary" property, which contains dictionary entries that conform to the "Address Book". If a phone number is available it would be in there.

If not, it either isn't available for your location or Google doesn't return that data to the reverse geocoded API.

Based on Google's JSON/REST based docs (http://code.google.com/apis/maps/documentation/geocoding/) I'd assume this data won't be returned, as it doesn't seem to be returned by the native API either.

0

精彩评论

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

关注公众号