[TIMOB-24216] Icons on ti.map (Android) not fully working
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | android, annotation, engSchedule, image, map |
| Reporter | John Dalsgaard |
| Assignee | Gary Mathews |
| Created | 2016-12-09T11:16:12.000+0000 |
| Updated | 2019-09-24T15:48:28.000+0000 |
Description
Attachments
| File | Date | Size |
|---|---|---|
| Screen 1.png | 2016-12-09T10:51:17.000+0000 | 328442 |
| Screen 2.png | 2016-12-09T10:59:20.000+0000 | 327268 |
| Screen 3.png | 2016-12-09T10:59:25.000+0000 | 332242 |
| Screen 4.png | 2016-12-09T10:59:30.000+0000 | 330678 |
| Screen 5.png | 2016-12-09T11:04:02.000+0000 | 328953 |
| Screen 6.png | 2016-12-09T11:06:36.000+0000 | 329599 |
| Screen 7.png | 2016-12-09T11:15:28.000+0000 | 327726 |
Hello, I have tested your issue. Here are my observations
Test 1: Using imageView blob, I can see the annotation. Which you said you can't. Here is my code:
Side note: Adding annotationView to map cause the annotation disappear.var annotationView = Ti.UI.createView({ width : 50, height : 50, opacity : 0.8, borderRadius : 25, //backgroundColor : '#2a3b0a', }); var imageView = Ti.UI.createImageView({ width : 35, height : 35, opacity : 1, image : '/images/zeroTrip.png' }); annotationView.add(imageView); var anno = Map.createAnnotation({ latitude : "38.7334226", longitude : "-77.7719012", title : "Location Title", subtitle : "Location Subtitle", image : imageView.toImage(), //image : '/images/zeroTrip.png', //image : annotationView.toImage() }); var map = Map.createView({ width : Ti.UI.FILL, height : 250, mapType : Map.NORMAL_TYPE, regionFit : true, userLocation : true, annotations : [anno], region : { latitude : "38.7334226", latitudeDelta : 0.05, longitude : "-77.7719012", longitudeDelta : 0.05 } }); //map.add(annotationView);Test 2: Using image reference (url), I see the annotation image slightly smaller than test 1. Changed code section:
var anno = Map.createAnnotation({ latitude : "38.7334226", longitude : "-77.7719012", title : "Location Title", subtitle : "Location Subtitle", //image : imageView.toImage(), image : '/images/zeroTrip.png', //image : annotationView.toImage() });Test 3: Rerun test 1(using image blob). Weirdly the annotainon image does not show for me. Which your case you said it does. Changed code section:
Side note: Adding annotationView to map cause the annotation appear.var anno = Map.createAnnotation({ latitude : "38.7334226", longitude : "-77.7719012", title : "Location Title", subtitle : "Location Subtitle", image : imageView.toImage(), //image : '/images/zeroTrip.png' });Test 4: Using image blob with background, I can reproduce the behavior you described. Changed code section:
var imageView = Ti.UI.createImageView({ width : 35, height : 35, opacity : 1, backgroundColor : '#2a3b0a', image : '/images/zeroTrip.png' });Test 5: Using image blob on top of a view with background. I can reproduce the behavior you described. Changed code section:
Side note: using borderRadius in view causes the image to disappear also the background (Test 6). Thanks.var annotationView = Ti.UI.createView({ width : 50, height : 50, opacity : 0.8, //borderRadius : 25, backgroundColor : '#2a3b0a', }); var imageView = Ti.UI.createImageView({ width : 35, height : 35, opacity : 1, image : '/images/zeroTrip.png' }); annotationView.add(imageView); var anno = Map.createAnnotation({ latitude : "38.7334226", longitude : "-77.7719012", title : "Location Title", subtitle : "Location Subtitle", //image : imageView.toImage(), //image : '/images/zeroTrip.png', image : annotationView.toImage() });