Problem
Given a map view, if you call "selectAnnotation" on a particular annotation, the map will automatically center on that annotation. This is a problem if you don't want it to automatically do this. It's also an inconsistency with iOS.
Solution
Provide an argument to selectAnnotation that can disable this behavior. Something like "doNotAutoCenter".
Sample Code
The following app.js should select the annotation on the map and bump the map up north of the annotation. With Android's current behavior, it will center on the annotation.
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var map = Ti.Map.createView({
mapType: Ti.Map.STANDARD_TYPE,
regionFit: true
});
var annotation = Ti.Map.createAnnotation({
latitude: 59.93473,
longitude: 10.760797,
title: 'Print House AS',
subtitle: 'Sandakerveien 24 C Bygg A2, 0473 Oslo',
animate: true,
pincolor: Ti.Map.ANNOTATION_PURPLE
});
map.addAnnotation(annotation);
map.selectAnnotation(annotation);
map.setLocation({ latitude: 60, longitude: 10.760797, latitudeDelta: 0.035, longitudeDelta: 0.035 });
win.add(map);
win.open();
Associated Helpdesk Ticket
http://support-admin.appcelerator.com/display/RSN-92979-828
test app showing the toggle behavior for centering on annotation via selectAnnotation call
test app.js modified from original test case that sets the center property to false
Verified with master.
merged onto 1_7_X
Verified fixed using sample code set to both "true" and "False" with Xoom 3.1 and Droid 1, 2.2.1. SDKs 1.7.2 r3d44999e and 1.8.0 r4b694252.