I am an android fresh man and developing a small app with Google Map V2. I want to get the WGS84 (i.e. LatLng)position when longpress on the MAP. Several methods are tried as the answers in other topic but the longpress guesture still could not be detected. Can anyone help on this to provide some sample code for me?
Asked
Active
Viewed 299 times
-1
-
You can refer this old post http://stackoverflow.com/questions/11701826/long-press-android – MarmiK Apr 11 '14 at 10:22
1 Answers
1
Have you tried this?
mMap.setOnMapLongClickListener(new OnMapLongClickListener() {
@Override
public void onMapLongClick(final LatLng point) {
}
});

Kendroid
- 116
- 4
-
It is working,but I still could not understand why GestureDetector is not working. Any idea on this? – user3523105 Apr 11 '14 at 12:15
-
Maybe the longclick event is consumed by the mapview. BTW, I don't think you can get the LatLng directly if you use GestureDetector :P. – Kendroid Apr 14 '14 at 02:17