Android - drawing path as overlay on MapView

前端 未结 1 424
轻奢々
轻奢々 2020-12-10 08:30

I have a class that extends Overlay and implemments Overlay.Snappable. I have overriden its draw method:

@Override
public void draw(Canvas c         


        
相关标签:
1条回答
  • 2020-12-10 08:52

    A few things. You should use p.moveTo(from.x, from.y); only once i.e., first time when you want to do it for the first time.

    Try this to set attributes for the paint object used for painting the polygon.

    polygonPaint = new Paint();
    polygonPaint.setStrokeWidth(2); 
    polygonPaint.setStyle(Paint.Style.STROKE);
    polygonPaint.setAntiAlias(true); 
    

    Hope this helps.

    0 讨论(0)
提交回复
热议问题