Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSMDroid: Adding a marker when user taps on map

I want to display a marker on map where user taps on map. Also this should not infect double tap for zooming and/or moving Mapview.

I am using osmdroid-android-4.0.jar

like image 635
Ali Behzadian Nejad Avatar asked Oct 20 '22 17:10

Ali Behzadian Nejad


1 Answers

Look at OSMBonusPack MapEventsOverlay/MapEventsReceiver:

http://code.google.com/p/osmbonuspack/source/browse/trunk/OSMBonusPack/src/org/osmdroid/bonuspack/overlays/MapEventsOverlay.java

You create a MapEventsOverlay, you add it to the maps overlay, and you pass it a MapEventsReceiver in which you implement your own singleTapUpHelper code.

like image 51
MKer Avatar answered Oct 23 '22 20:10

MKer