[AC-1193] Map Annotation click event not fired in IOS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-07-28T15:56:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules |
Labels | n/a |
Reporter | James Wilson |
Assignee | Radamantis Torres-Lechuga |
Created | 2015-07-18T17:28:28.000+0000 |
Updated | 2016-03-08T07:37:34.000+0000 |
Description
This is similar to MOD-1840 however it is also affecting 4.1.0GA so i assume this is a major issue for many people.
I receive an event from the pin source when i click on an annotation to select it. Once it is selected and i try to click on the right image (or anything) no event is fired. When i select outside the annotation i get an event fired from the annotation source. So i only receive an annotation source event when the annotaion is deselected which is not helpful.
Please help.
Some sample code is as follows:
var annotation = Alloy.createController("annotation", auctions[i]);
$.mapView.addAnnotation(annotation.getView());
$.mapView.addEventListener("click", function(e)
{
Titanium.API.info('map click: ' + e.clicksource);
});
In the annotation.js file:
var auction = arguments[0] || {};
$.annotationWrapper.latitude = auction["property.latitude"];
$.annotationWrapper.longitude = auction["property.longitude"];
$.annotationWrapper.leftView = Titanium.UI.createImageView({image : auction["property_advertisement.image_thumb_url"], height : 50, width : 50});
var title = auction["property.address_line_1"];
if (auction["property.address_line_2"])
{
title += ", " + auction["property.address_line_2"];
}
$.annotationWrapper.title = title;
$.annotationWrapper.subtitle = auction["suburb.name"];
In the annotation.tss file:
"#annotationWrapper[platform=ios]": {
image: "/common/images/house_pin.png",
animate: true,
rightButton: Titanium.UI.iPhone.SystemButton.DISCLOSURE,
showInfoWindow: false
}
"#annotationWrapper[platform=android]": {
image: "/common/images/house_pin.png",
animate: true,
rightButton: "/common/images/disclosure_icon.png",
showInfoWindow: false
}
Huge issue for us. So disappointed to find a regression like this in 4.1.0. Is there any workaround while we wait for a fix?