Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-325

Annotation click on leftButton/rightButton not firing as expected

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      TiSDK 4.1.0
      Xcode 6.4
      Alloy

      Description

      The click on the leftButton or rightButton are simply not fired.
      The click is fired if I click on the pin, and I get a response like this:

      click {
            annotation = "[object TiMapAnnotation]";
            bubbles = 1;
            cancelBubble = 0;
            clicksource = pin;
            index = 0;
            map = "[object mapview]";
            source = "[object mapview]";
            title = Cupertino;
            type = click;
       }
      

      Sample project:

      index.js

      Ti.Map = require("ti.map");
       
      var annotation = Ti.Map.createAnnotation({
      	latitude : "37.322998",
      	longitude : "-122.032182",
              title : "Cupertino",
      	subtitle : "",
      	leftButton : Titanium.UI.iPhone.SystemButton.DISCLOSURE,
      });
      $.mapview.addAnnotation(annotation);	
       
      $.mapview.region = {
      	 latitude : "37.322998",
                  longitude : "-122.032182",
                  latitudeDelta : 0.3,
                  longitudeDelta : 0.3
      };
       
      $.mapview.selectAnnotation(annotation);
       
      $.mapview.addEventListener("click", function(e) {
      	console.log("click",e);
      });
      $.index.open();
      

      index.xml

      <Alloy>
      	<Window>
      		<View id="mapview" module="ti.map">
              </View>
      	</Window>
      </Alloy>
      

        Attachments

          Activity

            People

            • Assignee:
              mrahman Mostafizur Rahman
              Reporter:
              a.marcone Alberto Marcone
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration