Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8856] Android: Map Annotations - Multiple map annotations throws a NPE

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2012-05-29T16:14:22.000+0000
Affected Version/sRelease 2.0.2, Release 2.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsapi, parity
ReporterWilson Luu
AssigneeHieu Pham
Created2012-04-20T16:54:37.000+0000
Updated2017-03-10T18:56:28.000+0000

Description

Description: Was investigating TIMOB-7977 (an iOS bug). For parity, I decided to check if code from TIMOB-7977 will work on Android devices. Steps to reproduce: 1. Launch app in T15417.zip Actual: App does not launch. I get a NPE in logcat instead. See attachment. Expected: App should launch with 4 annotations. See iOS attachment. Note: This bug is *not* a regression. Bug still occurs in 2.0.1.GA2.

Attachments

FileDateSize
AnnotationImage1.jpg2012-04-20T16:54:37.000+000056013
logcat.txt2012-04-20T16:54:37.000+00009684
T15417.zip2012-04-20T16:54:37.000+00003685521

Comments

  1. Hieu Pham 2012-05-29

    This is a native Android bug for 2.2. Creation of URI given certain String causes a NPE. Marking as Won't Fix. For future reference, here's a simpler test code that I used:
       Titanium.UI.setBackgroundColor('#000');
       
       // create tab group
       var tabGroup = Titanium.UI.createTabGroup();
       
       
       var mountainView1 = Titanium.Map.createAnnotation({
           latitude:37.390749,
           longitude:-122.081651,
           // title:"Appcelerator Headquarters",
           subtitle:'Mountain View, CA',
           image:'map_pin.png',
           animate:true,
           leftButton: '../images/appcelerator_small.png',
           //myid:1 // Custom property to uniquely identify this annotation.
       });
       
       
       var arr = [mountainView1];
       
       var mapview = Titanium.Map.createView({
           mapType: Titanium.Map.STANDARD_TYPE,
           region: {latitude:37.375749, longitude:-122.066651, 
                   latitudeDelta:0.01, longitudeDelta:0.01},
           animate:true,
           regionFit:true,
           userLocation:true,
           annotations:arr
       });
       
       
       
       //
       // create base UI tab and root window
       //
       var win1 = Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
       var tab1 = Titanium.UI.createTab({  
           icon:'KS_nav_views.png',
           title:'Tab 1',
           window:win1
       });
       
       win1.add(mapview);
       
       //
       // create controls tab and root window
       //
       var win2 = Titanium.UI.createWindow({  
           title:'Tab 2',
           backgroundColor:'#fff'
       });
       var tab2 = Titanium.UI.createTab({  
           icon:'KS_nav_ui.png',
           title:'Tab 2',
           window:win2
       });
       
       
       
       //
       //  add tabs
       //
       tabGroup.addTab(tab1);  
       tabGroup.addTab(tab2);  
       
       
       // open tab group
       tabGroup.open();
       
       
  2. Lee Morris 2017-03-10

    Closing ticket as the issue will not fix.

JSON Source