Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation click event #12

Open
firefountain opened this issue Nov 11, 2014 · 0 comments
Open

Annotation click event #12

firefountain opened this issue Nov 11, 2014 · 0 comments

Comments

@firefountain
Copy link

Right now the annotation have no click event. This is what I added to add the annotation click event.

On Titanium you have one new event:

MapView.addEventListener("tapOnCalloutAccessoryControl", function(e) {
/* 
* Add your code here!
*
*/
})

On the iOS module:

On the layerForAnnotation:

    marker.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];

    return marker;

and just add after:

- (void)tapOnCalloutAccessoryControl:(UIControl *)control forAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)map
{
    NSLog(@"You tapped the callout button!");
    @ Add whatever you want here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant