Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5111] MapView Annotations show truncated title when selected immediately

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-05-22T21:11:20.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sn/a
ComponentsiOS
Labelsannotation, iphone, mapview, mobile,
ReporterTony Lukasavage
AssigneeIngo Muschenetz
Created2011-08-25T07:45:51.000+0000
Updated2017-06-26T17:51:06.000+0000

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

FileDateSize
mapview.jpg2011-08-25T07:45:51.000+000021063
truncate.jpg2011-08-25T07:45:51.000+000020235

Comments

  1. Lee Morris 2017-05-22

    Resolving as cannot reproduce, tested with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.9.0.201705021158 Ti SDK 6.1.0.v20170519131839 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.7.0_80

JSON Source