-(long long)addMarker:(NSData*)param param1:(double)param1 param2:(double)param2 param3:(NSString*)param3 param4:(NSString*)param4 param5:(BOOL)param5{
__block Person *person = nil;
dispatch_sync(dispatch_get_main_queue(), ^{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
person = [[Person alloc] init];
person.param=param;
person.position = CLLocationCoordinate2DMake(param1, param2);
person.param3=param3;
person.param4=param4;
person.param5=param5;
[_clusterManager addItem:person];
[person retain];
[pool release];
});
return person;
}
- (void)renderer:(id<GMUClusterRenderer>)renderer willRenderMarker:(GMSMarker *)marker {
if ([marker.userData isKindOfClass:[Person class]]) {
Person *person = (Person *)marker.userData;
marker.position = person.position;
marker.title = nil;
marker.snippet = nil;
if(person.param != nil) {
UIImage* img = nil;
if ([[UIImage class] respondsToSelector:@selector(imageWithData:scale:)]){
// If we are on retina we need to provide scale, or the images will be too big and
// blurry.
// Scale version available only in iOS 6 and later so check here.
img = [UIImage imageWithData:person.param scale:scaleValue];
} else {
img = [UIImage imageWithData:person.param];
}
marker.icon = img;
}
marker.map=mapView;
marker.tappable = YES;
}
}
the probleme is i dont know where codename one execute the click event on the marker , in the original method addMarker i cant see the event click action to add it to my render method, the fucntion didTapMarker work well