SachinS SachinS - 1 year ago 126
Android Question

How to handle touch event on google map (MapFragment)?

I am looking for a proper touch event that will be triggered when user touches the map (Google Maps Android API). Does anyone have an idea as to how to do it ?

Answer Source

You can directly add click listener and get position of touch on Map in form of Location.

 map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
            public void onMapClick(LatLng latLng) {
              //Do what you want on obtained latLng

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download