[TIMOB-18181] Android: When setting a border radius on an annotation customView, no view (as pin) is displayed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.4.0, Release 3.4.1 |
Fix Version/s | n/a |
Components | Android |
Labels | MapModule, TCSupport |
Reporter | Vincent Degroote |
Assignee | Srikanth Sombhatla |
Created | 2014-08-19T13:52:18.000+0000 |
Updated | 2016-04-18T06:08:56.000+0000 |
Description
H4. Problem Description
We have tested this issue with our sample code. When setting a borderRadius property on an annotation customView, no view (as pin) is displayed in Android devices. But if we don’t use borderRadius property it works fine as we expect. It’s a bug.
Test Case
1. Create a new mobile project (Classic Titanium) 2. Paste this code into app.js:
var MapModule = require('ti.map');
var win = Ti.UI.createWindow({fullscreen: false});
var myView1 = Ti.UI.createView({
width:10,
height:10,
borderRadius:5,
backgroundColor:'red'
});
var anno = MapModule.createAnnotation({latitude: -33.87365, customView: myView1, longitude: 151.20689, title: "Test", subtitle: "A red circle"});
var map = MapModule.createView({
userLocation: true,
mapType: MapModule.NORMAL_TYPE,
animate: true,
annotations: [anno],
region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }, //Sydney
top: '30%'
});
win.add(map);
win.open();
3. Run it in a device
I'm having the same problem
Com'on guys!
I did some testing on this issue: !http://migaweb.de/map_ui.jpg! Left side: with borderRadius (or just borderColor) -> red outline shows that there is an invisible annotation Right side: without any borderColor/borderRadius The box is there but invisible. Then I've added
to _private void handleCustomView(Object obj)_ to save the actual image. Without border it's the red square. With the border it's just a transparent box. So I guess the problem has to do with TiBorderWrapperView.java since the map is adding an invisible box. So toImage() on a view with a border property produces a transparent image