Wednesday, July 20, 2011

[android-developers] using drawPath() to draw a shape on the MapView

Hello,
When i draw a line or a circle or whatever on the map by using e.g.
the canvas.drawLine(....) method in my draw() method of the Overlay
class everything is fine.
But when i want to draw a Shape using this code:

// path.moveTo(pt.x, pt.y);
// path.lineTo(pt.x-20, pt.y+60);
// path.lineTo(pt.x, pt.y+50);
// path.lineTo(pt.x+20, pt.y+60);
// path.close();
//
// canvas.drawPath(path, new Paint());

the shape remains on its old positions when moving the map. it doesn't
refresh its current position on the map correctly. the "old" positions
remains...
What's the problem here??
Like i said when i use canvas.drawLine() or canvas.drawCircle() etc.
it works....

greets

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment