Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Have an arrow as rightButton on a MapView annotation item to show detail view


is it possible to configure an annotation in a way so that it shows a "right arrow" simiar to the disclosure icon in a TableView?

When clicking on this icon, I would like to go to a detail view with my Tab/Navigation group.


— asked November 11th 2010 by Czar
  • annotation
  • disclosure
  • mapview

1 Answer

  • looks like you can specify the button for the left and right side of the annotations, I would suggest you start there.


    — answered November 11th 2010 by Aaron Saunders
    1 Comment
    • I Know. But would I have to create a button for each annotation? Not very efficient… This is my code so far:

      var annotationsAdded = false;
      function addAnnotaions() {
          if (!annotationsAdded) {
              for (var i = 0; i < customData.length; i++) {
                  var offer = customData[i];
                  var annotaion = Titanium.Map.createAnnotation({
                      latitude: offer.latitude,
                      longitude: offer.longitude,
                      title: offer.city,
                      subtitle: 'Now only: ' + (offer.newPrize).toFixed(0) + '€',
                      pincolor: Titanium.Map.ANNOTATION_RED,
                      leftButton: '../images/flags/'+offer.country+'.png',
                      offer:offer // CUSTOM ATTRIBUTE THAT IS PASSED INTO EVENT OBJECTS
          annotationsAdded = true;

      — commented November 11th 2010 by Czar
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.