在iPhone中的地图中显示当前位置的标题 [英] To display the title for the current loaction in map in iphone

查看:99
本文介绍了在iPhone中的地图中显示当前位置的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iPhone开发的新手.我已经创建了地图应用程序,并显示了当前位置,并将图钉放置到当前位置.现在,我想在单击图钉时显示当前位置的标题和副标题.请帮帮我.

I am new to iphone development. I have created map applications and i displayed the cuurent locations and drop a pin to the current location. now i want to display the title and subtitle of the current location when i am clicking the pin. Please help me out.

谢谢.

推荐答案

要显示标题和字幕,添加到地图的注释对象必须响应-title-subTitle消息(在MKAnnotation协议中定义为可选) .

To display title and subtitle your annotation object you add to map must respond to -title and -subTitle messages (defined in MKAnnotation protocol as optional).

您还可以使用MKReverseGeocoder类获取有关给定位置的信息,该类查询基于google的服务并通过其委托返回数据(请参见MKReverseGeocoderDelegate协议).

You can also obtain information about given location using MKReverseGeocoder class that queries google based servises for that and returns data via its delegate (see MKReverseGeocoderDelegate protocol).

这篇关于在iPhone中的地图中显示当前位置的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆