osmbonuspack icon indicating copy to clipboard operation
osmbonuspack copied to clipboard

Text style of the number displayed on cluster's marker depends on screen density

Open 2ndGAB opened this issue 9 years ago • 2 comments

Hello, Ths number of contained markers on the cluster's icon appear very differently depending on screen density as you can see for 7" 1920x1080 and 7" 1024 x 600 It could be helpful that you use the following formula to prevent this problem I think:

public RadiusMarkerClusterer(Context ctx) {
    super(ctx);

    mTextPaint = new Paint();
    mTextPaint.setColor(Color.WHITE);
    mTextPaint.setTextSize(25 * ctx.getResources().getDisplayMetrics().density);
    mTextPaint.setFakeBoldText(true);
    mTextPaint.setTextAlign(Paint.Align.CENTER);
    mTextPaint.setAntiAlias(true);
}

2ndGAB avatar Jun 03 '16 10:06 2ndGAB

Good point, thanks. I also set a relevant cluster icon by default in RadiusMarkerClusterer. commit #0c82ec9

MKergall avatar Jun 04 '16 16:06 MKergall

Ok, good and could you also think about #204?

2ndGAB avatar Jun 05 '16 08:06 2ndGAB