Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2ndGAB opened this issue Jun 3, 2016 · 2 comments

Comments

@2ndGAB
Copy link

2ndGAB commented Jun 3, 2016

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 2ndGAB changed the title number of contained markers in cluster display depending on screen density number of contained markers in cluster display depends on screen density Jun 3, 2016
@2ndGAB 2ndGAB changed the title number of contained markers in cluster display depends on screen density Text style of the number displayed on cluster's marker depends on screen density Jun 3, 2016
@MKergall
Copy link
Owner

MKergall commented Jun 4, 2016

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

@2ndGAB
Copy link
Author

2ndGAB commented Jun 5, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants