var a = Ti.Map.createAnnotation({ ... });
annotation.rightView = Ti.UI.createView({ ... });
// async code to populate the view
a.addEventListener("click", function(e) { Ti.API.warn("ANNO clicked!"); });
mapView.addAnnotation(a);
mapView.addEventListener("click", function(e) { Ti.API.warn("MAP clicked!"); });
This code will not trigger click event on pin touch and the annotation will never open.
Adding title (non empty value) will work as expected (annotation showing up).
annotation.setTitle(" ")
(from
http://developer.appcelerator.com/question/159509/iphone-map-annotation-click-not-working)
Hello Luca! Please provide a full testcase so we can move this one to platform. TIA! Best, Mauro
This issue is reproducible with test code pasted below. Annotation is showing but ‘click’ event is not firing.
My testing environment follows:
OS: MAC OS X 10.8.5 Ti SDK: 3.1.3 GA Ti CLI: 3.2.0 IOS simulator 7.0My test code
Step to reproduces
1. Create a new project 2. Paste test code in app.js 3. Now run on iOS 7 with simulator 7.0 4. Click on annotation 5. Event will not fired Thanks