Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-5660

Android: Annotation.image can't be changed if annotation added to mapView.

    Details

      Description

      If annotation is on the map then changing image attribute will not change image itself.
      Similar problem to TIMOB-20620 with color attribute, which was fixed in one of the Sprints.

      var window = Ti.UI.createWindow({
        backgroundColor : 'white'
      }); 
       
      window.open(); 
       
      var mapModule = require('ti.map');  
       
      var map = mapModule.createView({
         bottom : 50
      }); 
       
      window.add(map); 
       
      var annotation = mapModule.createAnnotation({
         latitude : 1,
         longitude : 1,
         image: '/images/baloon_green.png'
      }); 
       
      map.addAnnotation(annotation); 
       
      var view = Ti.UI.createView({
         backgroundColor: 'red',
         bottom: 0,
         height: 50
      });
       
      window.add(view);
       
      view.addEventListener('click', function() {
       
         view.backgroundColor = 'green';
        annotation.image = '/images/baloon_red.png';		//Change annotation image here
        annotation.setImage('/images/baloon_red.png');   //Change annotation image here
       
       
      });
      
      

        Attachments

        1. 1.png
          1.png
          301 kB
        2. 2.png
          2.png
          300 kB

          Activity

            People

            • Assignee:
              shossain Shak Hossain
              Reporter:
              CREATIVE KAIZEN CREATIVE KAIZEN
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code