Steps to reproduce:
var window = Ti.UI.createWindow({
backgroundColor: 'white'
});
window.open();
var mapModule = require('ti.map');
var map = mapModule.createView({
bottom: 50
});
window.add(map);
var annotation1 = mapModule.createAnnotation({
//title: '1',
latitude: 1,
longitude: 1,
pincolor: mapModule.ANNOTATION_AZURE
})
var annotation2 = mapModule.createAnnotation({
latitude: 1,
longitude: 1,
pincolor: mapModule.ANNOTATION_RED
});
map.addAnnotation(annotation1);
map.addAnnotation(annotation2);
var view = Ti.UI.createView({
backgroundColor: 'red',
bottom: 0,
height: 50,
width: 50,
});
view.addEventListener('click', function() { map.selectAnnotation(annotation1)})
window.add(view);
Actual results
If title is set than selectAnnotation function will work and pull Annotation to front. If title is not set than Annotation won't be pulled to front.
Expected results
Annotation after selectAnnotation() should be pulled to front no matter if it has title or not.
This is a native behaviour of the Google Map for Android. When the module
selects
the annotation, one of the things it does is also toshowInfoWindow
which is used to show any title and also bring forward the marker/annotation that is being used. If there is no annotation title, it will not be brought forward.To get it to be
selected
you have to include a title. Will be resolving this asWon't Fix
as that's the expected behaviour of that module.Closing ticket as "Won't Fix" with reference to previous comments.