Search code examples
androidmylocationoverlay

How do MyLocationOverlay.getMyLocation() and getLastFix() differ?


Looking at MyLocationOverlay - does anyone know what the difference is between:

public GeoPoint getMyLocation();
public android.location.Location getLastFix();

MyLocationOverlay

(besides the return type)? Does the getMyLocation() method return a value only after a location has been found, and the getLastFix() will return a cached last fix, possibly from a different session?


Solution

  • According to the docs both relate to most-recently-set user location, so I'd say that both returns last cached location, and getMyLocation just provides type conversion from Location to GeoPoint.