Skip to content

Annotation click event #12

@firefountain

Description

@firefountain

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.
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions