[TIMOB-14333] Android: Clicking Map Annotation with Map added to table view row crashes
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-02-28T13:33:05.000+0000 |
Affected Version/s | Release 2.1.3, Release 2.1.4 |
Fix Version/s | Release 2.1.4, Release 3.0.0 |
Components | Android |
Labels | android, mobilesdk |
Reporter | Ashish Nigam |
Assignee | Ingo Muschenetz |
Created | 2013-06-21T17:16:31.000+0000 |
Updated | 2017-03-16T20:54:17.000+0000 |
Description
Note that this bug does not occur in 3.0GA onwards. We have a customer using 2.1.4GA who needs this to be fixed.
Adding Map view on table view row object and clicking on Map Annotation crashes the app.
Steps to reproduce.
1: Use the below mentioned sample.
2: create a sample app and put the code in app.js file.
3: Launch the app in android.
4: Click on the map annotation. App should crash.
var win = Ti.UI.createWindow({
backgroundColor : "gray"
});
var tbView = Ti.UI.createTableView();
var tbRow1 = Ti.UI.createTableViewRow({
title:"row1",
height:200,
width:320
});
var tbRow2 = Ti.UI.createTableViewRow({
title:"row2",
height:200,
width:320
});
var tbRow3 = Ti.UI.createTableViewRow({
title:"row3",
height:100,
width:320
});
var locationMap = Ti.Map.createView({
mapType : Titanium.Map.STANDARD_TYPE,
region : {
latitude : 0,
longitude : 0,
latitudeDelta : 0.01,
longitudeDelta : 0.01
},
animate : true,
regionFit : true,
userLocation : false,
height:150,
width:320
});
var locationAnnotation = Ti.Map.createAnnotation({
latitude : 28.65432,
longitude : 74.23456,
title : "employee.AddressName",
subtitle : "employee.StreetFull",
pincolor : Titanium.Map.ANNOTATION_RED,
animate : true
});
locationMap.removeAllAnnotations();
locationMap.addAnnotation(locationAnnotation);
locationMap.setRegion({
latitude : 28.65432,
longitude : 75.23456,
latitudeDelta : 0.01,
longitudeDelta : 0.01
});
//=========
var locationMap1 = Ti.Map.createView({
mapType : Titanium.Map.STANDARD_TYPE,
region : {
latitude : 0,
longitude : 0,
latitudeDelta : 0.01,
longitudeDelta : 0.01
},
animate : true,
regionFit : true,
userLocation : false,
height:130,
width:320
});
var locationAnnotation1 = Ti.Map.createAnnotation({
latitude : 29.65432,
longitude : 74.23456,
title : "employee.AddressName",
subtitle : "employee.StreetFull",
pincolor : Titanium.Map.ANNOTATION_RED,
animate : true
});
locationMap1.removeAllAnnotations();
locationMap1.addAnnotation(locationAnnotation1);
locationMap1.setRegion({
latitude : 29.65432,
longitude : 75.23456,
latitudeDelta : 0.01,
longitudeDelta : 0.01
});
//=========
//tbRow1.add(locationMap);
tbRow2.add(locationMap1);
// tbRow3.add(locationMap);
var datavar = [tbRow1,tbRow2,tbRow3];
tbView.data = datavar;
win.add(tbView);
win.open();
I am going to mark this as fixed in 2.1.4 and 3.0.0.
Closing ticket as fixed.