[AC-2340] Titanium 3.1.3GA > IOS > Clicking on a map annotation's title or subtitle doesn't trigger a click event
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-10-10T18:53:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | annotations, mapView |
Reporter | Quoc Huy |
Assignee | Mauro Parra-Miranda |
Created | 2013-10-01T09:44:57.000+0000 |
Updated | 2016-03-08T07:41:21.000+0000 |
Description
I have an annotation added to a map view:
var annotation = Titanium.Map.createAnnotation( {
longitude: longitude,
latitude: latitude,
animate: true,
pincolor: Titanium.Map.ANNOTATION_RED,
leftButton: '/images/pin_star_gps.png',
rightButton: '/images/disclosure.png',
title: "Click to select",
subtitle: "hehe",
myid: 1,
} );
$.mapview.addAnnotation( annotation );
$.mapview.addEventListener( 'click', function( evt ) {
Ti.API.info( evt.annotation );
var annotation = evt.annotation;
var clickSource = evt.clicksource;
switch(clickSource) {
case 'title':
case 'subtitle':
Ti.API.info('title');
break;
case 'rightButton':
Ti.API.info('right button');
break;
case 'leftButton':
Ti.API.info('left button');
break;
}
} );
The title is never triggered.
Hi Quoc, Can you provide a code sample that can be dropped into a project and reproduced, and attach it as a file or format the code using the statement below on either side of the snippet(without spaces). { code }
DUP issue.