MKMapView 添加特定位置
谁能告诉我如何在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
获取您想要在地图上显示的位置的坐标。有一个注释数组,每个注释都有您想要显示的坐标。然后使用该方法
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