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

osmdroid-mapsforge: Unable to add marker and draw poly line on the map #1962

Open
vidhyablrgithub opened this issue Dec 21, 2023 · 2 comments

Comments

@vidhyablrgithub
Copy link

Marker m = new Marker(mMapView);
m.setTextLabelBackgroundColor(2);
//m.setTextLabelFontSize(fontSizeDp);
m.setTextLabelForegroundColor(6);
m.setTitle("hello world");
//must set the icon to null last
m.setIcon(null);
m.setPosition(new GeoPoint(x,y));
mMapView.getOverlays().add(m);

I am unable to add marker. It does not show up on the map. Please help.

@spyhunter99
Copy link
Collaborator

does the map show up at all?

@LostRat
Copy link
Contributor

LostRat commented Dec 22, 2023

Include this somewhere to force redraw (maybe only required after deleting Marker?):

mMapView.invalidate();

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

3 participants