Problem
When the map is placed in a view hierarchy it can sometimes be placed below all views (even below the window background color). This happens for example when you animate the parent view position. But when placed in a quite large view hierarchy I've noted that it randomly can behave the same as described above.
Run the code on 4.2.x device with Google Play installed.
Test case
var win = Ti.UI.createWindow({
backgroundColor : 'transparent',
orientationModes : [Titanium.UI.PORTRAIT],
exitOnClose : true,
navBarHidden : true
});
win.open();
var view2 = Ti.UI.createView({
width : Ti.UI.FILL,
height : Ti.UI.FILL,
backgroundColor : 'transparent'
});
var view3 = Ti.UI.createView({
top : 0,
left : 0,
width : 500,
height : 200,
backgroundColor : 'yellow'
});
var label = Ti.UI.createLabel({
color:'black',
text: "You should not see me if zOrderOnTop is set to true",
textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
font: { fontSize: 30 },
top: 0,
left : 0
});
view3.add(label);
var MapModule = require('ti.map');
var mapview = MapModule.createView({
mapType:MapModule.NORMAL_TYPE,
//zOrderOnTop: true
});
view2.add(mapview);
view2.add(view3);
win.add(view2);
1. Run the above code, you should see yellow label on top
2. Uncomment zOrderOnTop property, run it again, you should NOT see yellow label. Depending on device, you may see the yellow label flashing for a little bit, as Android relayout its children. But once re-layout is done, you should NOT see the yellow label.
Fail case: yellow label on top of map
Expected case: should not see yellow label.
This only happens on the first launch of the app on certain devices (listed in environment).
The test case above isn't the original test case. It is my test case in an attempt to create a consistent use case for zOrderOnTop. The original fail case can no longer be reproduced with the current map version. I'm closing this issue since it's not really a bug.
Closing as invalid.