[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 Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-06-25T14:32:14.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | api, qe-ios060112 |
Reporter | Anshu Mittal |
Assignee | Neeraj Gupta |
Created | 2012-06-05T04:13:42.000+0000 |
Updated | 2017-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();
Already documented. Look at click event in Map.View
Closing ticket as invalid.