//스래드 부분입니다
thread th = new thread();
 class thread extends Thread{
  public void run(){
   GpsCalc gpsCalc = new GpsCalc(); 
   while(flag!=true){
    try{
     th.sleep(1000);
     if(lastLati == 0 && lastLong == 0){ 
      // 아직 현재위치를 잡기 전이면 ...
      lastLati = //mLocation.getLastFix().getLatitude(); 
       (double) mLocation.getMyLocation().getLatitudeE6() / 1000000;
      lastLong = //mLocation.getLastFix().getLongitude();
       (double) mLocation.getMyLocation().getLongitudeE6() / 1000000;
     }
     // 위치가 변했다면 지나온 거리 누적 
     if((mLocation.getMyLocation().getLatitudeE6() != lastLati * 1000000) 
       || (mLocation.getMyLocation().getLongitudeE6() != lastLong * 1000000)){
      // 지나온거리 더하기 
      accuTrack += gpsCalc.distance(
        ((double) mLocation.getMyLocation().getLatitudeE6() / 1000000),
        ((double) mLocation.getMyLocation().getLongitudeE6() / 1000000),
        (lastLati),
        (lastLong));
      startLati = (double) mLocation.getMyLocation().getLatitudeE6() / 1000000;
      startLong = (double) mLocation.getMyLocation().getLongitudeE6() / 1000000;
      sLati = (int)(startLati * 1000000);
      sLong = (int)(startLong * 1000000);
      Point1 = new GeoPoint(fLati, fLong);
      // 현재위치 저장 
      lastLati = (double)mLocation.getMyLocation().getLatitudeE6() / 1000000;
      lastLong = (double)mLocation.getMyLocation().getLongitudeE6() / 1000000;
      
      fLati = (int)(lastLati * 1000000);
      fLong = (int)(lastLong * 1000000);
      Point2 = new GeoPoint(fLati,fLong);
      mHandler.sendMessage(mHandler.obtainMessage());
      } 
     } 
    catch(Exception e){ 
     
    }
    
   }
  }
 }
 
 private Handler mHandler = new Handler(){ 
  @Override 
  // 어떤 메시지가 전달되어도  설정. 
  public void handleMessage(Message msg) { 
   class MyOverlay extends Overlay {
    public void draw(Canvas canvas, MapView mapView, boolean shadow) {
     super.draw(canvas, mapView, shadow);
     Paint pnt = new Paint(); 
     targetPosition = new Point();
     startPosition = new Point();  
           pnt.setARGB(70,255, 0, 0);
           pnt.setStrokeWidth(2);  // 굵기
     pnt.setAntiAlias(true);
     canvas.drawColor(Color.RED);
     mMap.getProjection().toPixels(Point1, startPosition);
     //startPosition = mMap.getProjection().toPixels(Point1, null);
     mMap.getProjection().toPixels(Point2, targetPosition);
     canvas.drawLine(targetPosition.x, targetPosition.y, startPosition.x, startPosition.y, pnt);
              //canvas.drawCircle(pt.x, pt.y, 5, pnt); 59anx5u9xq
            }
    }
     Toast.makeText(MyProject2.this, " "+targetPosition, 
     Toast.LENGTH_SHORT).show();
   } 
  }; 

소스코드 중에 스레드 부분입니다.
소스 내용은 구글 맵에서 최초 저의 위치를 찾고 시작부분을 지정하면 종료부분 지정시까지 위의 스레드가 돌아가게 됩니다.
스레드가 돌면서 최초위치와 바뀐위치 사이의 거리를 계산하고 저장을 합니다. 
핸들러를 이용해서 점사이에 선을 그려주려고 하였는데, getProjection().toPixels를 이용하면 지오포인트로 핸드폰화면의 좌표를 출력해준다고 들었습니다. 그래서 구현을 하였는데 Point1, Point2값은 잘 들어오는 것을 토스트로 확인하였습니다.
하지만 startPosition과 TargetPosition값이 null이라고 토스트에 출력이 됩니다. 선은 그려지는것인데 안그려지는 것인지
아니면 좌표값이 출력이 되지 않아서 그려지지 않는 것인지 궁금합니다.
초보라 소스가 많이 지저분합니다. 양해부탁드리고 도와주시면 감사하겠습니다 ㅠㅠ