Adding button to MapView

141 views
Skip to first unread message

huy nguyen

unread,
Jun 26, 2016, 4:01:06 AM6/26/16
to mapsforge-dev
As the title said, is there anyway to add android widgets like a button in to MapView? Thank everyone.

Emux

unread,
Jun 26, 2016, 4:08:21 AM6/26/16
to mapsfo...@googlegroups.com
MapView is a regular Android View.

So you can host it in your layout and place on top any Android widgets.

An example showing this exists in our Samples (see here).

--
Emux

huy nguyen

unread,
Jun 26, 2016, 1:35:52 PM6/26/16
to mapsforge-dev
So can you show me one example how to add a button programmatically not by defining in xml layout? Thank you very much.

Emux

unread,
Jun 26, 2016, 1:39:06 PM6/26/16
to mapsfo...@googlegroups.com
You need to make a layout, add map view and then the buttons.

That's Android related procedure.
Try the official documentation or searching online, there are many examples for that.

--
Emux

huy nguyen

unread,
Jun 26, 2016, 7:45:59 PM6/26/16
to mapsforge-dev
Ok thank you, i will research this problem.
Reply all
Reply to author
Forward
0 new messages