[TIMOB-19011] Android: MapView is blank if the container view has rounded borders
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Reopened |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | android, mapView, module_androidmapv2, qe-manualtest, qe-testadded |
| Reporter | Matteo Landi |
| Assignee | Srikanth Sombhatla |
| Created | 2015-06-11T08:43:52.000+0000 |
| Updated | 2016-04-18T06:08:56.000+0000 |
Description
I recently tried to put a mapview inside another view with rounded borders (ie. with
borderRadius set), and the result was that the mapview ended up being _blank_ (ie. no map tiles, just the Google logo and the zoom controls). Everything works fine when I remove the borderRadius property from the container view.
Attached a minimal application that shows the problem. Let me know if you need anything else.
Ciao,
Matteo
var map_view = Ti.UI.createView({
height: Ti.UI.FILL,
width: Ti.UI.FILL,
});
var map = require('ti.map').createView({
height: Ti.UI.FILL,
width: Ti.UI.FILL,
});
var button = Ti.UI.createButton({
height: Ti.UI.SIZE,
title: 'Set borderRadius'
});
button.addEventListener('click', function() {
map_view.borderRadius = '30dp';
});
var container = Ti.UI.createView();
var win = Ti.UI.createWindow();
map_view.add(map);
container.add(map_view);
container.add(button);
win.add(container);
win.open();
Reverted this fix at https://github.com/appcelerator/titanium_mobile/pull/7641
Maps not rendered is a limitation. They need HW acceleration enabled to work as expected. http://stackoverflow.com/questions/14414222/mapview-not-visible-without-hardware-acceleration-turned-off http://developer.android.com/guide/topics/graphics/hardware-accel.html One option is to enable HW acceleration for 5.0+ devices only since material design relies on HW acceleration. cc [~hpham] [~msamah] [~cng]