Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10220] iOS: Annotations caret is offset from pin top and overlaps pin top

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-08-14T11:02:30.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-16 API, Release 2.1.2, Release 3.0.0
ComponentsiOS
LabelsSupportTeam, api, module_map, qe-testadded
ReporterVarun Joshi
AssigneeVishal Duggal
Created2012-07-27T15:06:27.000+0000
Updated2012-08-14T18:01:14.000+0000

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

{noformat} 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); {noformat}

Attachments

FileDateSize
iOS-Native.png2012-07-27T21:34:38.000+0000745671
iOS-Titanium.png2012-07-27T21:34:38.000+0000172938

Comments

  1. Vishal Duggal 2012-07-31

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2662
  2. Sabil Rahim 2012-08-14

    NOTE

    Test case select Annotation click event listener is wrong. It should be calling.
    mapObject.selectAnnotation(annotation2);
  3. Sabil Rahim 2012-08-14

    Reopening to update Fixversion to Release 2.1.2 label

JSON Source