Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19011] Android: MapView is blank if the container view has rounded borders

GitHub Issuen/a
TypeBug
PriorityCritical
StatusReopened
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, mapView, module_androidmapv2, qe-manualtest, qe-testadded
ReporterMatteo Landi
AssigneeSrikanth Sombhatla
Created2015-06-11T08:43:52.000+0000
Updated2016-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();

Comments

  1. Srikanth Sombhatla 2015-10-05

  2. Srikanth Sombhatla 2016-01-22

    Reverted this fix at https://github.com/appcelerator/titanium_mobile/pull/7641
  3. Srikanth Sombhatla 2016-02-11

    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]

JSON Source