GoogleMap.OnMyLocationChangeListener

  • GoogleMap.OnMyLocationChangeListener is deprecated and should no longer be used for location updates.

  • Developers should utilize RoadSnappedLocationProvider for road-aligned locations or FusedLocationProviderApi for general location data, as they offer better performance and efficiency.

  • This interface previously provided a callback mechanism through the onMyLocationChange method, triggered whenever the user's location (My Location dot) changed.

public static interface GoogleMap.OnMyLocationChangeListener

This interface is deprecated.
use RoadSnappedLocationProvider or com.google.android.gms.location.FusedLocationProviderApi instead, depending on your needs. FusedLocationProviderApi provides improved location finding and power usage over raw GPS. RoadSnappedLocationProvider further aligns locations to the road network.

Callback interface for when the My Location dot/chevron (which signifies the user's location) changes location.

Public Method Summary

abstract void
onMyLocationChange(Location location)
Called when the location of the My Location dot has changed (be it latitude/longitude, bearing or accuracy).

Public Methods

public abstract void onMyLocationChange (Location location)

Called when the location of the My Location dot has changed (be it latitude/longitude, bearing or accuracy).

Parameters
location The current location of the My Location dot.