GoogleMap.OnMapLongClickListener

  • GoogleMap.OnMapLongClickListener is an interface used to handle long-press actions on a Google Map.

  • The onMapLongClick method is triggered when a user long-presses on the map, provided no overlays have consumed the event, and it receives the geographical coordinates (LatLng) of the pressed point.

  • This listener's methods are executed on the Android UI thread, ensuring interactions with UI elements are safe.

public static interface GoogleMap.OnMapLongClickListener

Callback interface for when the user long presses on the map.

Listeners will be invoked on the Android UI thread.

Public Method Summary

abstract void
onMapLongClick(LatLng point)
Called when the user makes a long-press gesture on the map, but only if none of the overlays of the map handled the gesture.

Public Methods

public abstract void onMapLongClick (LatLng point)

Called when the user makes a long-press gesture on the map, but only if none of the overlays of the map handled the gesture. Implementations of this method are always invoked on the Android UI thread.

Parameters
point The point on the ground (projected from the screen point) that was pressed.