Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9374] iOS: Titanium.Map.Annotation: When clicked anywhere on the map(outside the annotation) while annotation is open, alert displays with clicksource as null and annotation closes.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-06-25T14:32:14.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sn/a
ComponentsiOS
Labelsapi, qe-ios060112
ReporterAnshu Mittal
AssigneeNeeraj Gupta
Created2012-06-05T04:13:42.000+0000
Updated2017-03-09T23:13:46.000+0000

Description

When clicked anywhere on the map(outside the annotation) while annotation is open, alert displays with clicksource as null.(Refer test case TIMOB-7272) Steps to Reproduce: 1. Launch application. 2. Click on the pin. Annotation is displayed. 3. Click outside the annotation. Actual: The alert is displayed with clicksource as null and annotation closes. Expected: Annotation should not close. Note: Also occured on 1.8.2

var win = Ti.UI.createWindow();
 
var atlantaParams = {
    latitude:33.74511,
    longitude:-84.38993,
    title:"Atlanta, GA",
    subtitle:'Atlanta Braves Stadium\nfoo',
    animate:true,
    rightButton: Titanium.UI.iPhone.SystemButton.DISCLOSURE,
    myid:3 // CUSTOM ATTRIBUTE THAT IS PASSED INTO EVENT OBJECTS
};
 
atlantaParams.pincolor = Titanium.Map.ANNOTATION_PURPLE;
 
var atlanta = Titanium.Map.createAnnotation(atlantaParams);
 
var mapview = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5},
    animate:true,
    regionFit:true,
    userLocation:true,
    annotations:[atlanta]
});
 
mapview.addEventListener("click", function(e) {
    var info = '\n';
     
    info += 'type: ' + e.type + '\n';
    info += 'clicksource: ' + e.clicksource + '\n';
    info += 'title: ' + e.title + '\n';
    info += 'index: ' + e.index + '\n';
    info += 'annotation: ' + e.annotation + '\n';
    info += 'map: ' + e.map + '\n';
    info += 'source: ' + e.source + '\n';
     
    Ti.API.info(info);
    alert(info);
});
 
mapview.addAnnotation(atlanta);
 
win.add(mapview);
 
win.open();

Comments

  1. Vishal Duggal 2012-06-25

    Already documented. Look at click event in Map.View
  2. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source