有没有办法通过 iphone 的 MapKit 找到用户所处的状态?

发布于 2024-08-25 21:28:04 字数 104 浏览 3 评论 0原文

我正在使用适用于 iPhone 的 MapKit,并将其设置为获取用户的位置并将其显示在视图上。但我需要知道它们处于哪种状态,以便我知道要加载并向用户显示哪些数据。有什么办法可以获得此类信息吗?

I am using the MapKit for the iPhone and have it setup to get the user's location and display it on the view. But I need to know which state they're in so I know what data to load and display to the user. Is there any way to get that sort of info?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌面超妹 2024-09-01 21:28:04

查看 CurrentAddress代码示例:

它利用了 MKReverseGeocoder
提供服务的类
转换您的地图坐标
(指定为纬度/经度
配对)进入有关该信息的信息
坐标,例如国家、城市、
或街道。反向地理编码器对象
是一个可以工作的单次对象
通过基于网络的地图服务
查找其地标信息
指定的坐标值。使用
地标信息是利用
MKPlacemark 类来存储它
信息。

Have a look at the CurrentAddress code sample:

It makes use of the MKReverseGeocoder
class that provides services for
converting your map coordinate
(specified as a latitude/longitude
pair) into information about that
coordinate, such as the country, city,
or street. A reverse geocoder object
is a single-shot object that works
with a network-based map service to
look up placemark information for its
specified coordinate value. To use
placemark information is leverages the
MKPlacemark class to store this
information.

二货你真萌 2024-09-01 21:28:04

好吧,看来 MKReverseGeocoder 可以做到这一点,但我还没有确定如何做到,我会做一些挖掘。

Ok, so it seems the MKReverseGeocoder can do this, but I've yet to determine how, I'll do some digging.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文