Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12479] iOS: Allow map annotation to fire a click event without showing the callout

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-15T01:22:29.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 19, 2013 Sprint 19 API, Release 3.2.0
ComponentsiOS
Labelsmodule_map, qe-testadded
ReporterDavide Cassenti
AssigneeVishal Duggal
Created2013-01-29T18:25:12.000+0000
Updated2013-10-23T23:57:03.000+0000

Description

Feature description

When clicking on a map annotation, a callout is always shown. Need to avoid the callout to be displayed, and fire the click event anyway.

Comments

  1. Ingo Muschenetz 2013-02-04

    This deviates from native behavior and so we will not support it.
  2. Vishal Duggal 2013-09-10

    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();
       
  3. Vishal Duggal 2013-09-10

    https://github.com/appcelerator/titanium_mobile/pull/4670
  4. Wilson Luu 2013-10-15

    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)
  5. Wilson Luu 2013-10-15

    Correcting my comment

JSON Source