appcelerator/titanium_mobile_blackberry — pull request #129 by pec1985 (2013-07-15 21:05:54+00:00)
Title: [TIMOB-13820] Added selectAnnotation() to MapView

Test code:
```
var win = Titanium.UI.createWindow();

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/appcelerator_small.png',
myid:1 // Custom property to uniquely identify this annotation.
});

var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {latitude:33.74511, longitude:-84.38993,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
userLocation:true,
annotations:[mountainView]
});

win.add(mapview);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {

Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid);

// Check for all of the possible names that clicksouce
// can report for the left button/view.
if (evt.clicksource == 'leftButton' || evt.clicksource == 'leftPane' ||
evt.clicksource == 'leftView') {
Ti.API.info("Annotation " + evt.title + ", left button clicked.");
}
});
var btn = Ti.UI.createButton({
title: 'select annotation',
bottom: 0
});

btn.addEventListener('click', function(){
mapview.selectAnnotation(mountainView);
});

win.add(btn);
win.open();
```