Project: titanium
Issue TIMOB-15448: iOS: No event generated on click of map annotation title or subtitle
h5. Problem When clicking on an annotation in a mapview, no event is generated for SDK 7.x/8.x but it’s working well for SDK 6.1. For more details visit http://developer.appcelerator.com/question/157471/mapview-click-event-listener-not-working-ios7 h5. Test Code {code} var win2 = Ti.UI.createWindow({	barColor : '#ff0000',	extendEdges : [Ti.UI.EXTEND_EDGE_ALL], }); var mountainView = Titanium.Map.createAnnotation({	latitude : 37.390749,	longitude : -122.081651,	title : "Appcelerator Headquarters",	subtitle : 'Mountain View, CA',	pincolor : Titanium.Map.ANNOTATION_RED,	animate : true,	leftButton : '/images/arrow.png',	myid : 1 // Custom property to uniquely identify this annotation. }); var mapview = Titanium.Map.createView({	mapType : Titanium.Map.STANDARD_TYPE,	region : {	latitude : 37.390749,	longitude : -122.081651,	latitudeDelta : 0.01,	longitudeDelta : 0.01	},	animate : true,	regionFit : true,	userLocation : true,	annotations : [mountainView] }); win2.add(mapview); // Handle click events on any annotations on this map. mapview.addEventListener('click', function(evt){ var clicksource = evt.clicksource; alert(clicksource); if (clicksource == 'title' || clicksource == 'rightButton'){ Ti.API.info('Item clicked'); } }); win2.open(); {code} h5. Steps to reproduce Please follow my steps to reproduce this bug:- # Create new project # Replace app.js code to my test code # Run with IOS SDK 6.1 # Click on annotation pin. Annotation appears with title and subtitle # Click on title or subtitle # Its shows alert message # Now change to iOS SDK 7.x/8.x and follow steps 4 to 6 # For iOS 7/8, if you click on title or subtitle, alert message will not display
Story points: 13