GoogleMap.OnMyLocationClickListener
Callback interface for when the My Location dot (which signifies the user's location) is
clicked.
Public Methods
public
abstract
void
onMyLocationClick
(Location location)
Called when the My Location dot is clicked.
This is called on the Android UI thread.
Parameters
location |
The current location of the My Location dot.
|
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-07-02 UTC.
[null,null,["Last updated 2025-07-02 UTC."],[[["`GoogleMap.OnMyLocationClickListener` is an interface used to handle clicks on the \"My Location\" dot in Google Maps."],["It includes a single method, `onMyLocationClick(Location location)`, which is triggered when the user taps the \"My Location\" dot, providing the current location."],["This method is executed on the Android UI thread, ensuring any UI updates within it are handled safely."]]],["The `GoogleMap.OnMyLocationClickListener` interface provides a callback for when the user's location dot on a Google Map is clicked. The key action is the `onMyLocationClick(Location location)` method, which is invoked when the dot is clicked. This method, executed on the UI thread, provides the current `Location` of the user, represented by the clicked dot.\n"]]