Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 4.0.0
    • Fix Version/s: Release 4.1.1
    • Component/s: iOS
    • Environment:

      ti.map 2.3.1
      SDK 4.0.0.GA
      iOS 8.3

    • Story Points:
      13
    • Sprint:
      2015 Sprint 16 SDK

      Description

      There are some other tickets related to this, but since most of them show no activity, are old or cover only part of the problem, here's one ticket and test case that covers it all.

      The following test case shows that the only 2 times a click-event that fires is when you tap a pin to open the annotation and when you tap the map to close the annotation. Tapping on the leftButton/View, rightButton/View, title or subtitle does not fire the event. Another bug is that the clicksource when you tap the map to close the annotation is annotation and not map.

      Adding listeners directly to the leftView/rightView does not work either.

      Test case

      var map = require('ti.map');
       
      var win = Ti.UI.createWindow();
       
      var anOne = map.createAnnotation({
        latitude:37.390749,
        longitude:-122.081651,
        title:"Appcelerator Headquarters",
        subtitle:'Mountain View, CA',
        leftButton: Ti.UI.iPhone.SystemButton.SAVE,
        rightButton: Ti.UI.iPhone.SystemButton.SAVE
      });
       
      var lBtn = Ti.UI.createView({
        backgroundColor: 'red',
        width: 40,
        height: 40
      });
       
      lBtn.addEventListener('click', function(e) {
        console.error(e);
      });
       
      var rBtn = Ti.UI.createView({
        backgroundColor: 'red',
        width: 40,
        height: 40
      });
       
      rBtn.addEventListener('click', function(e) {
        console.error(e);
      });
       
      var anTwo = map.createAnnotation({
          latitude:37.33182,
          longitude:-122.0311837,
          title:"Apple Headquarters",
          subtitle:'Cupertino, CA',
          leftView: lBtn,
          rightView: rBtn
      });
       
      var mapview = map.createView({
        region: {latitude:37.390749, longitude:-122.081651, latitudeDelta:1, longitudeDelta:1},
        annotations:[anOne, anTwo],
      });
       
      win.add(mapview);
       
      mapview.addEventListener('click', function(evt) {
        console.error(evt);
      });
       
      win.open();
      

      Logs

      Jun 25 11:11:10 iPhone-Fokke LiveViewer[6105] <Warning>: [ERROR] {
      	    annotation = "[object TiMapAnnotation]";
      	    bubbles = 1;
      	    cancelBubble = 0;
      	    clicksource = pin;
      	    index = 14;
      	    map = "[object TiMapIOS7View]";
      	    source = "[object TiMapIOS7View]";
      	    title = "Apple Headquarters";
      	    type = click;
      	}
      Jun 25 11:11:11 iPhone-Fokke LiveViewer[6105] <Warning>: [ERROR] {
      	    annotation = "[object TiMapAnnotation]";
      	    bubbles = 1;
      	    cancelBubble = 0;
      	    clicksource = annotation;
      	    index = 14;
      	    map = "[object TiMapIOS7View]";
      	    source = "[object TiMapIOS7View]";
      	    title = "Apple Headquarters";
      	    type = click;
      	}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                fokkezb Fokke Zandbergen
                Reviewer:
                Chee Kiat Ng (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20139
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code