从 iOS 获取反向地理编码当前位置的最简单方法
我从这里的另一个问题中看到: 确定 iPhone 用户的国家/地区 可以获取当前国家/地区iPhone 的用户就在其中。
这对于许多用途来说相当方便。但是,是否可以更深入地从 iOS(如果有信息)推断用户所在的州或城市?
我想如果不可能的话,下一步将是反向地理编码服务。您是否可以为您的应用程序雇用反向地理编码服务之类的服务?
I saw from another question here : Determine iPhone user's country that it is possible to get the current country the user of the iPhone is in.
And that is quite convenient for many uses. However, would it be possible to go even deeper and infer from iOS (if it has the information) which state or city the user is in as well?
I suppose reverse geocoding services would be the next step if things weren't possible.. Are there even such things as a reverse geocoding service you can hire for your app though?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
MKReverseGeocoder
在 iOS 5 中已弃用,现在是CLGeocoder
MKReverseGeocoder
is deprecated in iOS 5, now it'sCLGeocoder
结果
Result
我将从 CLReverseGeocoder 类开始。
这个 stackoverflow 问题获取当前城市,并且可能适合您的情况使用。
I would start with the
CLReverseGeocoder
class.This stackoverflow question gets the current city and can probably be adapted for your use.
以下代码可以轻松检索完整详细信息。
Following codes can be easy to retrieve full-details.