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

ItemizedOverlayWithFocus crash when very long description having no space #1322

linquize opened this issue Apr 22, 2019 · 0 comments


None yet
2 participants
Copy link

commented Apr 22, 2019

Issue Type

[X ] Bug

Description and/or steps/code to reproduce the problem

Make a very long description without any space. It will try to break the string into several lines.
However, current code crashes in draw() method.

String description = "";
for (int i = 0; i < 300; i++)
    description += "A";
ArrayList<OverlayItem> items = new ArrayList<OverlayItem>();
items.add(new OverlayItem("Title", description, new GeoPoint(0.0d,0.0d)));
ItemizedOverlayWithFocus<OverlayItem> mOverlay = new ItemizedOverlayWithFocus<OverlayItem>(items,
	new ItemizedIconOverlay.OnItemGestureListener<OverlayItem>() {
	public boolean onItemSingleTapUp(final int index, final OverlayItem item) {
	    return true;
	public boolean onItemLongPress(final int index, final OverlayItem item) {
		return false;


If it's a bug, version(s) of android this affects:


Version of osmdroid the issue relates to:


@spyhunter99 spyhunter99 added the bug label May 5, 2019

@spyhunter99 spyhunter99 added this to the v6.1.1 milestone May 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.