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

iOS: Annotations caret is offset from pin top and overlaps pin top

    Details

      Description

      Issue

      In iOS the annotations on both retina and non-retina devices are offset from the pins top and they also overlap the pin. The annotation should be directly above the pin with no overlap like iOS does in its native maps application.

      The screenshots illustrate this issue. Notice in the native maps application the caret is directly above the pin. It does not overlap the pin and it is not offset.

      Sample Code

       
      var win = Ti.UI.createWindow();
      win.open();
       
          //create object instance, a parasitic subclass of Observable
          var self = Ti.UI.createView();
          
          var mapObject = Titanium.Map.createView({
                  mapType: Titanium.Map.STANDARD_TYPE,
                  animate:true,
                  regionFit:true,
                  userLocation:true,
                  height:Ti.UI.FILL,
                  zoomEnabled:true,
                  region: {latitude:37.77501, longitude:-122.419, 
                  latitudeDelta:0.01, longitudeDelta:0.01},
              });
              
       
              
          var selectAnnotations = Ti.UI.createButton({
              title:"Select Annotations",
              bottom:'20dp',
              height:'35dp',
              width:'180dp'
          });
              
           
          var annotation = Titanium.Map.createAnnotation({
              animate:true,
              title: 'Hello I am an annotation with lots of information:',
              subtitle: 'This is a subtitle to an large annotation', 
              pincolor:Titanium.Map.ANNOTATION_RED,
              latitude:parseFloat(37.776),
              longitude:parseFloat(-122.419)
            });
            
            var annotation2 = Titanium.Map.createAnnotation({
              animate:true,
              title: '#2 Hello I am an annotation with lots of information:',
              subtitle: 'This is a subtitle to an large annotation', 
              pincolor:Titanium.Map.ANNOTATION_RED,
              latitude:parseFloat(37.77501),
              longitude:parseFloat(-122.419)
           });
            
            var annotation3 = Titanium.Map.createAnnotation({
              animate:true,
              title: '#3 Hello I am an annotation with lots of information:',
              subtitle: 'This is a subtitle to an large annotation', 
              pincolor:Titanium.Map.ANNOTATION_RED,
              latitude:parseFloat(37.770),
              longitude:parseFloat(-122.419)
            });
            
            
            var annotation4 = Titanium.Map.createAnnotation({
              animate:true,
              title: '#4 Hello I am an annotation with lots of information:',
              subtitle: 'This is a subtitle to an large annotation', 
              pincolor:Titanium.Map.ANNOTATION_RED,
              latitude:parseFloat(37.770),
              longitude:parseFloat(-122.43)
            });
           
            
            
          mapObject.addAnnotation(annotation);
          mapObject.addAnnotation(annotation2);
          mapObject.addAnnotation(annotation3);
          mapObject.addAnnotation(annotation4);
              
          self.add(mapObject);
          self.add(selectAnnotations);
          
          
          var thisObj = this;
          selectAnnotations.addEventListener('click', function(e) {
              mapObject.selectAnnotation({annotation: annotation2, center: false});
       
          });
       
      win.add(self);
      
      

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              vjoshi Varun Joshi
            • Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code