Richiamato quando viene fatto clic sul pulsante La mia località.
Metodi pubblici
pubblico
astratto
booleano
onMyLocationButtonClick()
Richiamato quando viene fatto clic sul pulsante La mia località.
Questo viene chiamato nel thread dell'interfaccia utente di Android.
Utilizza com.google.android.gms.location.FusedLocationProviderApi se devi ottenere la posizione attuale dell'utente.
Ritorni
true se il listener ha utilizzato l'evento (ovvero non deve verificarsi il comportamento predefinito); false in caso contrario (deve verificarsi il comportamento predefinito). Il
comportamento predefinito prevede lo spostamento della videocamera in modo che sia centrata sulla posizione dell'utente.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2026-05-13 UTC."],[],["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"]]