Good day! I already asked a similar question, but there was no answer to it.
mapview you mapview me how to catch a single tap on a mapview map?
So far, I have managed with such a crutch, but can someone tell me an elegant solution?

 private boolean tap = false; mapView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_UP: if(tap) Toast.makeText(context, "tap", Toast.LENGTH_SHORT).show(); break; case MotionEvent.ACTION_DOWN: tap = true; break; case MotionEvent.ACTION_MOVE: tap = false; break; } return false; } }); 

UPD: google maps api v1

  • What version of maps do you use? - Roman Zakharov
  • first updated in topic - andreich

1 answer 1

Detecting common gestures

The gesture occurs when the user places one or more fingers on the touch screen, and the application interprets the touch sequence as a special gesture.

  • no :( unfortunately it does not work - andreich