Use com.google.android.gms.location.FusedLocationProviderApi if you need to obtain the
user's current location.
Returns
true if the listener has consumed the event (i.e., the default behavior
should not occur); false otherwise (i.e., the default behavior should occur). The
default behavior is for the camera move such that it is centered on the user location.
[[["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 2025-09-15 UTC."],[[["\u003cp\u003e\u003ccode\u003eGoogleMap.OnMyLocationButtonClickListener\u003c/code\u003e is an interface used to handle clicks on the "My Location" button within a Google Map.\u003c/p\u003e\n"],["\u003cp\u003eThe primary method, \u003ccode\u003eonMyLocationButtonClick()\u003c/code\u003e, is called when the button is clicked and allows custom actions to be performed before or instead of the default camera movement.\u003c/p\u003e\n"],["\u003cp\u003eReturning \u003ccode\u003etrue\u003c/code\u003e from \u003ccode\u003eonMyLocationButtonClick()\u003c/code\u003e prevents the default behavior (centering the camera on the user's location), while returning \u003ccode\u003efalse\u003c/code\u003e allows it.\u003c/p\u003e\n"]]],["The `GoogleMap.OnMyLocationButtonClickListener` interface triggers the `onMyLocationButtonClick()` method when the \"My Location\" button is pressed. This method, executed on the UI thread, allows developers to handle the event. Returning `true` prevents the default camera movement to the user's location, while `false` allows it. For retrieving the user's location, the `FusedLocationProviderApi` is recommended.\n"],null,[]]