Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11663] Android: Map: Mapview in more than one tab of a tabgroup crashes application

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-11-05T23:48:50.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsqe-and100112
ReporterSatyam Sekhri
AssigneeIngo Muschenetz
Created2012-11-05T10:24:42.000+0000
Updated2017-03-20T20:46:29.000+0000

Description

An application with tabgroup which has more than one tab with a mapview, crashes when the second tab with mapview is opened This is not a regression. The issue occurs as atleast as far as 2.1.1 Steps to Reproduce: 1. Create an application with code below and launch the application 2. Click on Tab2 Actual Result: After Step1: Application opens up with mapview shown in tab1 After step2: Application crashes. (refer to the attached error logs) Expected Result: After Step 2, the application should not crash and tab2 with mapview should be shown
var tabGroup = Titanium.UI.createTabGroup();
var _window = Ti.UI.createWindow();
_window.title='Tab 1';
_window.backgroundColor='#fff';

var tab1 = Titanium.UI.createTab({ 
	icon:'KS_nav_views.png',
    title:'Tab 1',
    window:_window
});
var regionSV = {latitude:37.337681,longitude:-122.038193,latitudeDelta:0.04, longitudeDelta:0.04};
 
var mapview = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    animate:true,
    region: regionSV,
    regionFit:true,
    userLocation:true,
    visible: true,
});
_window.add(mapview);
 
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
});
var regionSV2 = {latitude:37.337681,longitude:-122.038193,latitudeDelta:0.04, longitudeDelta:0.04};
 
var mapview2 = Titanium.Map.createView({
    mapType: Titanium.Map.STANDARD_TYPE,
    animate:true,
    region: regionSV2,
    regionFit:true,
    userLocation:true,
    visible: true,
});
win2.add(mapview2);

tabGroup.addTab(tab1); 
tabGroup.addTab(tab2); 
  
tabGroup.open();

Attachments

FileDateSize
log.txt2012-11-05T10:24:43.000+00006189

Comments

  1. Ingo Muschenetz 2012-11-05

    Evidently can only have one MapView per application
  2. Ingo Muschenetz 2012-11-05

    Log file indicates that Android only supports on MapView at a time. It is suggested that this is information enough.
  3. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source