1. Throw sample below to an MobileWeb project
2. Click one annotation on the map view (only one is clickable)
3. The others won't capture any click events (Notice if you run this sample over again, clicking other annotation remaining ones won't capture any click event).
var win1 = Titanium.UI.createWindow({
title : 'Tab 1',
backgroundColor : '#fff'
});
var mountainView = Titanium.Map.createAnnotation({
latitude:37.7819496, longitude:-122.4945521,
title:"Appcelerator Headquarters1", subtitle:'Mountain2 View, CA',
pincolor:Titanium.Map.ANNOTATION_RED, animate:true,
leftButton: '../images/appcelerator_small.png', myid:1
// Custom property to uniquely identify this annotation.
});
var mountainView2 = Titanium.Map.createAnnotation({
latitude:37.7907269, longitude:-122.4588735,
title:"Appcelerator Headquarters2", subtitle:'Mountain View, CA',
pincolor:Titanium.Map.ANNOTATION_RED, animate:true,
leftButton: '../images/appcelerator_small.png', myid:2
// Custom property to uniquely identify this annotation.
});
var mountainView3 = Titanium.Map.createAnnotation({
latitude:37.7878780, longitude:-122.4111750,
title:"Appcelerator Headquarters3", subtitle:'Mountain View, CA',
pincolor:Titanium.Map.ANNOTATION_RED, animate:true,
leftButton: '../images/appcelerator_small.png', myid:3
// Custom property to uniquely identify this annotation.
});
var mapview = Titanium.Map.createView({
mapType : Titanium.Map.STANDARD_TYPE,
region : {
latitude : 37.78583526611328,
longitude : -122.40641784667969,
latitudeDelta : 0.03,
longitudeDelta : 0.03
},
animate : true,
regionFit : true,
userLocation : true,
annotations : [mountainView, mountainView2, mountainView3]
});
win1.add(mapview);
win1.open();
Confirmed this is indeed a bug. :(
Pull request: https://github.com/appcelerator/titanium_mobile/pull/2234