MKMapView 添加特定位置

发布于 2024-11-25 02:23:15 字数 134 浏览 0 评论 0原文

谁能告诉我如何在 MapView(MKMapView) 上添加一些特定位置。我制作了显示我当前位置的地图视图,我还添加了搜索栏来搜索地址的位置。目前,这工作正常,但我还希望 MapView 向我显示一些特定位置(例如:附近的医院)

谢谢!

Could anyone please tell how to add some specific locations on MapView(MKMapView). I made mapView which shows my current location, I also added searchBar for searching address's locations. For now, this works fine, but I also want for MapView to show me some specific locations (for example: hospitals nearby)

Thanks!

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

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

发布评论

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

评论(1

彩虹直至黑白 2024-12-02 02:23:15

获取您想要在地图上显示的位置的坐标。有一个注释数组,每个注释都有您想要显示的坐标。然后使用该方法

[urMapView addAnnotations:urAnnotationsArray];

Get the coordinates for the location you want to show on the map. Have an array of annotations with each annotation having the coordinate you want to show. then make use of the method

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