Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5111

MapView Annotations show truncated title when selected immediately

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 1.7.2
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Mac OSX, iPhone sim 4.3

      Description

      When an Annotation is added to a MapView and then immediately selected, the title of the annotation is truncated, as seen in the attached truncate.jpg image. Currently, you can work around this issue by using a setTimeout() call on selectAnnotation().

      Code to Reproduce:

      var win= Titanium.UI.createWindow({  
          title:'weather',
          backgroundColor:'#fff'
      });
      win.open({modal:true});
       
      var anno = Ti.Map.createAnnotation({
          latitude:18.533333,
          longitude: 73.866667,
          title:"Atlanta, GA",
          subtitle:'Atlanta Braves Stadium',
          pincolor:Ti.Map.ANNOTATION_GREEN,
          animate:true,
          rightButton: Titanium.UI.iPhone.SystemButton.DISCLOSURE
      });
       
      var mapview = Titanium.Map.createView({
          top:40,
          height:300,
          mapType: Titanium.Map.STANDARD_TYPE,
          animate:true,
          regionFit:true,
          userLocation:false,
          region:{latitude:18.533333,longitude: 73.866667, latitudeDelta:0.01, longitudeDelta:0.01},
          annotations:[anno]
      });
              
      win.add(mapview);
      mapview.selectAnnotation(anno);
      //setTimeout(function() {mapview.selectAnnotation(anno);}, 500);
      

      Again, if you uncomment the setTimeout() call at the end (and comment the prior selectAnnotation() call), everything works as expected, as seen in the attached mapview.jpg image.

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              tlukasavage Tony Lukasavage
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration