我已经实现了tapOnMarker 选择器,并创建了自定义的annotationView。它显示了annotationView,但是当我点击pinpoint时,annotationView抽象出计数小于当前pinpoint的pinpoint,并且pinpoints有最大计数显示在annotationView上,这是我的实现代码。
- (void) tapOnMarker: (RMMarker*) marker onMap: (RMMapView*) map
{
frame = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"redbox.png"]];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame =CGRectMake(0, 0,0, 0);
[button setBackgroundImage:[UIImage imageNamed:@"pinMarker.png"] forState:UIControlStateNormal];
button.enabled = YES;
button.userInteractionEnabled = YES;
[button addTarget:self action:@selector(markerLabelButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[marker setLabel:frame];
}