Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20616] If Map Module Annotation has no title, than selectAnnotation() won't work

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2016-03-23T05:36:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterCREATIVE KAIZEN
AssigneeAshraf Abu
Created2016-03-21T21:19:08.000+0000
Updated2017-03-30T21:08:45.000+0000

Description

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.

Comments

  1. Ashraf Abu 2016-03-23

    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 to showInfoWindow 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.
  2. Ashraf Abu 2016-03-23

    To get it to be selected you have to include a title. Will be resolving this as Won't Fix as that's the expected behaviour of that module.
  3. Lee Morris 2017-03-30

    Closing ticket as "Won't Fix" with reference to previous comments.

JSON Source