GoogleMap.OnMapClickListener
Stay organized with collections
Save and categorize content based on your preferences.
Callback interface for when the user taps on the map.
Listeners will be invoked on the Android UI thread.
Public Method Summary
abstract void |
onMapClick( LatLng
point)
Called when the user makes a tap gesture on the map, but only if none of the
overlays of the map handled the gesture.
|
Public Methods
public abstract void onMapClick (LatLng
point)
Called when the user makes a tap 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 tapped. |
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 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`GoogleMap.OnMapClickListener` is an interface used to handle user tap interactions on a Google Map."],["The `onMapClick` method within this interface is triggered when a user taps on the map, provided no overlays on the map intercept the tap."],["This method provides the geographical coordinates (`LatLng`) of the tapped point as an argument and is always executed on the Android UI thread for responsiveness."]]],["The `GoogleMap.OnMapClickListener` interface provides a callback for map tap events. The `onMapClick(LatLng point)` method is invoked when a user taps the map, provided no map overlays have handled the gesture. This method, which runs on the Android UI thread, receives the `LatLng` coordinates of the tapped location. This interface allows developers to respond to user taps and determine the specific geographic location interacted with.\n"]]