Problem Scalling Annotation leftView, leftButton, rightView, rightButton image

You must Login before you can answer or comment on any questions.

I'm facing a problem scaling images on the left and right buttons or views of an annotation.

Titanium SDK 1.8.2 Android 2.3.3

Since the rest of data such as latitude and longitude work so I won't include the data in the sample code. hopefully can find some tips here.

This below code works but not scaling properly.

var anAnnoation = Ti.Map.createAnnotation({
    leftButton:'http://myhost.com/img01.jpg'
    });
mapview.addAnnotation(anAnnoation );

The below code is not working

var anImgView=Ti.UI.createImageView({
                    height:50,
                    image:'http://myhost.com/img01.jpg'
                    });
var anAnnoation = Ti.Map.createAnnotation({
    leftButton:anImgView
    });
mapview.addAnnotation(anAnnoation );
Even using a View is not working too.
var anImgView=Ti.UI.createView({
                    height:50,
                    backgroundImage:'http://myhost.com/img01.jpg'
                    });
var anAnnoation = Ti.Map.createAnnotation({
    leftView:anImgView
    });
mapview.addAnnotation(anAnnoation );

Your Answer

Think you can help? Login to answer this question!