Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24216] Icons on ti.map (Android) not fully working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandroid, annotation, engSchedule, image, map
ReporterJohn Dalsgaard
AssigneeGary Mathews
Created2016-12-09T11:16:12.000+0000
Updated2019-09-24T15:48:28.000+0000

Description

Attachments

FileDateSize
Screen 1.png2016-12-09T10:51:17.000+0000328442
Screen 2.png2016-12-09T10:59:20.000+0000327268
Screen 3.png2016-12-09T10:59:25.000+0000332242
Screen 4.png2016-12-09T10:59:30.000+0000330678
Screen 5.png2016-12-09T11:04:02.000+0000328953
Screen 6.png2016-12-09T11:06:36.000+0000329599
Screen 7.png2016-12-09T11:15:28.000+0000327726

Comments

  1. Sharif AbuDarda 2016-12-10

    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:

       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);
       
    Side note: Adding annotationView to map cause the annotation disappear.

    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:

       var anno = Map.createAnnotation({
           latitude : "38.7334226",
           longitude : "-77.7719012",
           title : "Location Title",
           subtitle : "Location Subtitle",
           image : imageView.toImage(),
           //image : '/images/zeroTrip.png'
       });
       
    Side note: Adding annotationView to map cause the annotation appear.

    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:

       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()
       });
       
    Side note: using borderRadius in view causes the image to disappear also the background (Test 6). Thanks.

JSON Source