获取一个图形页面选择的注释信息 [英] Get info on a mapview selected annotation
本文介绍了获取一个图形页面选择的注释信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个图形页面,并在每一个按钮标注注解。我需要做的就是从这个标注,即抢属性。头衔,但记录此行:
I have annotations on a mapview and a callout with a button on each. What I need to do is grab properties from this callout, ie. the title, but logging this line:
NSLog(@"%@", mapView.selectedAnnotations);
收益< AddressAnnotation:0x1bdc60>
这显然给我任何有用的信息...
returns <AddressAnnotation: 0x1bdc60>
which obviously gives me no useful info...
我的问题是,我怎么能访问选择的注释标注的属性?
My question is, how can I access the properties of a selected annotation callout?
推荐答案
下面是我在annotationviewClick功能所做的:
Here is what I did in the annotationviewClick function:
希望这有助于
-(IBAction) annotationViewClick:(id) sender{
[self.view addSubview:LoadingView];
Annotation *ann = [myMap.selectedAnnotations objectAtIndex:([myMap.selectedAnnotations count]-1)];
NSLog(@"Selected:%@", [ann tag]);
}
这篇关于获取一个图形页面选择的注释信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文