パスを描画し、移動時に距離を計算する方法。以下のコードは、onLocationChanged メソッドで距離を計算しませんか??
public void onLocationChanged(Location location) {
// TODO Auto-generated method stub
String text = String.format("Lat:\t %f\nLong:\t %f\nAlt:\t %f\nBearing:\t %f\nDistance:\t %f",
location.getLatitude() *1E6, location.getLongitude() *1E6,
location.getAltitude() *1E6, location.getBearing() *1E6, location.distanceTo(location));
textOut.setText(text);
lat = (int) (location.getLatitude() *1E6);
longi = (int) (location.getLongitude() *1E6);
GeoPoint myLocation = new GeoPoint(lat, longi);
OverlayItem overlayItem = new OverlayItem(myLocation, "WHATZ UP", "2nd String");
StagePoint custom = new StagePoint(d, Start.this);
custom.insertPinpoint(overlayItem);
overlayList.add(custom);
}