New basemap styling is coming soon to Google Maps Platform. This update to map styling includes a new default color palette, modernized pins, and improvements to map experiences and usability. All map styles will be automatically updated in March 2025. For more information on availability and how to opt in earlier, see
New map style for Google Maps Platform.
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-24 UTC.
[null,null,["Last updated 2025-03-24 UTC."],[[["`GoogleMap.OnMapLongClickListener` is an interface to handle long-press gestures on a Google Map."],["The `onMapLongClick` method is called when a user long-presses on the map, providing the geographical coordinates of the pressed point."],["This listener is triggered only if no other map overlays have consumed the long-press event."],["`onMapLongClick` executions occur on the main Android UI thread, ensuring smooth interaction with the application's interface."]]],[]]