GoogleMap.OnMyLocationButtonClickListener

  • The GoogleMap.OnMyLocationButtonClickListener interface is used for callbacks when the My Location button is clicked.

  • The onMyLocationButtonClick method is called on the Android UI thread when the my location button is clicked.

  • The onMyLocationButtonClick method returns a boolean indicating whether the default behavior (centering the camera on the user's location) should occur.

public static interface GoogleMap.OnMyLocationButtonClickListener

Callback interface for when the My Location button is clicked.

Public Method Summary

abstract boolean
onMyLocationButtonClick()
Called when the my location button is clicked.

Public Methods

public abstract boolean onMyLocationButtonClick ()

Called when the my location button is clicked.

This is called on the Android UI thread.

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.