Givi Givi - 1 year ago 103
Android Question

MapView onCLick Event Listener

So I've been trying to detect click events to a

in order to start a method with the click.

Trying any variation of standard
were no good.

I do not want to add an overlay of to "catch" clicks on a certain part of the map.
I want the map to continue to be responsive to drag,zooms, etc.

Any help would be appreciated.

Answer Source

So, apparently the solution is quite simple. I guess it was added in one of the last support libs. GoogleMap now supports onMapClick.

mMapView.getMap().setOnMapClickListener(new OnMapClickListener()
                    public void onMapClick(LatLng arg0)
                        android.util.Log.i("onMapClick", "Horray!");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download