[TIMOB-12479] iOS: Allow map annotation to fire a click event without showing the callout
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-10-15T01:22:29.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 19, 2013 Sprint 19 API, Release 3.2.0 |
| Components | iOS |
| Labels | module_map, qe-testadded |
| Reporter | Davide Cassenti |
| Assignee | Vishal Duggal |
| Created | 2013-01-29T18:25:12.000+0000 |
| Updated | 2013-10-23T23:57:03.000+0000 |
This deviates from native behavior and so we will not support it.
Test Code
var win = Titanium.UI.createWindow(); var mountainView = Titanium.Map.createAnnotation({ latitude:37.390749, longitude:-122.081651, title:"Appcelerator Headquarters", subtitle:'Mountain View, CA', pincolor:Titanium.Map.ANNOTATION_RED, animate:true, leftButton: '../images/appcelerator_small.png', canShowCallout:false, myid:1 // Custom property to uniquely identify this annotation. }); var mapview = Titanium.Map.createView({ mapType: Titanium.Map.STANDARD_TYPE, region: {latitude:37.390749, longitude:-122.081651, latitudeDelta:0.01, longitudeDelta:0.01}, animate:true, regionFit:true, userLocation:true, annotations:[mountainView] }); win.add(mapview); // Handle click events on any annotations on this map. mapview.addEventListener('click', function(evt) { if (evt.clicksource == 'pin') { Ti.API.info('Got Click') } }); win.open();https://github.com/appcelerator/titanium_mobile/pull/4670
Closing ticket as fixed. Verified canShowCallout=false does not bring up the callout bubble after clicking on the pin. And, verified canShowCallout=true will bring up the callout bubble after clicking on the pin. Tested on: Titanium Studio, build: 3.2.0.201310112240 SDK build: 3.2.0.v20131013140318 Device: iphone 5s (7.0.2)
Correcting my comment