[AC-325] Annotation click on leftButton/rightButton not firing as expected
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-12T11:49:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | click, mapView, pin |
Reporter | Alberto Marcone |
Assignee | Mostafizur Rahman |
Created | 2015-08-26T14:59:10.000+0000 |
Updated | 2015-11-12T11:49:00.000+0000 |
Description
The click on the leftButton or rightButton are simply not fired.
The click is fired if I click on the pin, and I get a response like this:
click {
annotation = "[object TiMapAnnotation]";
bubbles = 1;
cancelBubble = 0;
clicksource = pin;
index = 0;
map = "[object mapview]";
source = "[object mapview]";
title = Cupertino;
type = click;
}
Sample project:
index.js
Ti.Map = require("ti.map");
var annotation = Ti.Map.createAnnotation({
latitude : "37.322998",
longitude : "-122.032182",
title : "Cupertino",
subtitle : "",
leftButton : Titanium.UI.iPhone.SystemButton.DISCLOSURE,
});
$.mapview.addAnnotation(annotation);
$.mapview.region = {
latitude : "37.322998",
longitude : "-122.032182",
latitudeDelta : 0.3,
longitudeDelta : 0.3
};
$.mapview.selectAnnotation(annotation);
$.mapview.addEventListener("click", function(e) {
console.log("click",e);
});
$.index.open();
index.xml
<Alloy>
<Window>
<View id="mapview" module="ti.map">
</View>
</Window>
</Alloy>
Hello, We couldn't reproduce this issue as a bug in our environment. leftButton/rightButton annotation click works as expected. *Test Result*
[Screenshot](http://postimg.org/image/7rbxb9ovx/) *Testing Environment:* Appcelerator Command-Line Interface, version 5.0.4 Appcelerator Studio, build: 4.3.3.201510212245 Ti SDK Version : 5.0.2.GA Node.js Version : 0.10.37 Mac OS X,Version : 10.10.1 Jdk version : 1.7.0_80.jdk simulator : iPhone 6(8.2) *Steps to test:* 1. Create an Alloy project. 2. Copy below test codes to respective files of your project. 3. Run the project. Click on leftButton and rightButton and observe the output in console. *Test Case:* index.xml
index.js
Thanks.