hi all,
I have a Main_Overlay class that extends Overlay.
I added This overlay to the mapview and override the Draw method as of
below:
public void draw(android.graphics.Canvas canvas, MapView mapView,
boolean shadow )
{
mPath = new Path();
mPath.moveTo(0, -240);
mPath.lineTo(-50, -100);
mPath.lineTo(0, -150);
mPath.lineTo(50, -100);
mPath.close();
Paint paint2 = new Paint();
paint2.setStyle(Paint.Style.FILL);
paint2.setAlpha(80);
mPaint.setAntiAlias(true);
mPaint.setColor(Color.RED);
mPaint.setStyle(Paint.Style.FILL);
mPaint.setAlpha(40);
int w = canvas.getWidth();
int h = canvas.getHeight();
int cx = w / 2;
int cy = h / 2;
canvas.translate(cx, cy);
canvas.drawPath(mPath, mPaint);
}
However, the path is shown twice on the map canvas. One near the 0,0.
The other is at the bottom right hand corner.
When i draw it on normal canvas, only one path is shown.
Can Someone please advise?
Thanks!
Bryan
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en