I am working in Google Maps. I want to create a Path between 5 to 6 nodes, I mean just drawing a line between points.
The following class is an inner class for drawing:
class MyOverlay extends Overlay{
    public void draw(Canvas canvas, MapView mapv, boolean shadow){
        super.draw(canvas, mapv, shadow);
        Paint  mPaint = new Paint();
        mPaint.setDither(true);
        mPaint.setColor(Color.RED);
        mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
        mPaint.setStrokeJoin(Paint.Join.ROUND);
        mPaint.setStrokeCap(Paint.Cap.ROUND);
        mPaint.setStrokeWidth(2);
        GeoPoint gP1 = new GeoPoint(19240000,-99120000);
        GeoPoint gP2 = new GeoPoint(37423157, -122085008);
        GeoPoint gP3 = new GeoPoint(20000000 , -50000000) ; 
        GeoPoint[] G = new GeoPoint[3] ;
        G[1] = gP1 ; 
        G[2] = gP2 ; 
        G[3] = gP3 ; 
        Point p1 = new Point();
        Point p2 = new Point();
        Point p3 = new Point () ; 
        Path path = new Path();
        projection.toPixels(gP1, p1);
        projection.toPixels(gP2, p2);
        projection.toPixels(gP3, p3) ; 
        //path.moveTo(p2.x, p2.y);
        //path.lineTo(p1.x,p1.y);
        //path.lineTo(p3.x, p3.y) ;       
        //canvas.drawLines(pts , mPaint) ; 
        canvas.drawPath(path, mPaint);
    }
}
These two lines of code are the code from the onCreate() method in the outer class:
 projection = mapView.getProjection();
 mapOverlays.add(new MyOverlay());
 
     
     
    