Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18776] iOS: Map Annotation buttons are not aligned properly when Annotation title text is large

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNot Our Bug
Resolution Date2015-04-14T23:38:26.000+0000
Affected Version/sRelease 3.5.1
Fix Version/sn/a
ComponentsiOS
Labelsalign, annotation, map
ReporterShuo Liang
AssigneeEric Merriman
Created2015-04-02T05:45:41.000+0000
Updated2017-03-21T20:41:15.000+0000

Description

Description

Using may Annotation, when Annotation title text is large, Annotation leftButton and rightButton are not aligned properly. Button appears in the top portion

Reproduce:

1.Just simply run the test case below.
var Map = require('ti.map'); 
var win = Titanium.UI.createWindow(); 

var mountainView = Map.createAnnotation({ 
latitude : -33.852222, 
longitude : 151.210556, 
title : "Aadsafsfsdfsdfdsfdsfdsfdsfsfsdf", 
subtitle : 'skjhfjskh', 
pincolor : Map.ANNOTATION_AZURE, 
myid : 1 // Custom property to uniquely identify this annotation. 
}); 

mountainView.leftButton = "images.png"; 
mountainView.rightButton = Titanium.UI.iPhone.SystemButton.INFO_LIGHT;; 

var mapview = Map.createView({ 
mapType : Map.NORMAL_TYPE, 
region : { 
latitude : -33.87365, 
longitude : 151.20689, 
latitudeDelta : 0.1, 
longitudeDelta : 0.1 
}, 
animate : true, 
regionFit : true, 
userLocation : true, 
annotations : [mountainView] 
}); 

win.add(mapview); 
// Handle click events on any annotations on this map. 
mapview.addEventListener('click', function(evt) { 
Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid); 
}); 
win.open(); 

Except Result:

The button should get aligned well.

Actual Result:

Annotation leftButton and rightButton are not aligned properly. Button appears in the top portion. Screenshot attached.

Attachments

FileDateSize
map.PNG2015-04-02T05:51:01.000+0000665012
nativeIphone4.png2015-04-14T05:09:50.000+0000519844

Comments

  1. Ingo Muschenetz 2015-04-13

    Can we try this with a native test case?
  2. Chee Kiat Ng 2015-04-14

    Native test case outcome is the *same* as described. Please find attached screenshot of native test case. Hence this is native behavior. *Note*: This only occurs on iPhone 4 and 5. it looks ok on iPhone 6 and 6 plus.
  3. Lee Morris 2017-03-21

    Closing this ticket as the issue is not our bug.

JSON Source