private void drawPolygon(Canvas canvas, MapView mapView)
{
Point ptpolygon1=mapView.getProjection().toPixels(geoPolygon1, null);
Point ptpolygon2=mapView.getProjection().toPixels(geoPolygon2, null);
Point ptpolygon3=mapView.getProjection().toPixels(geoPolygon3, null);
Point ptpolygon4=mapView.getProjection().toPixels(geoPolygon4, null);
Path pathpolygon=new Path();
pathpolygon.moveTo(ptpolygon1.x, ptpolygon1.y);
pathpolygon.lineTo(ptpolygon2.x, ptpolygon2.y);
pathpolygon.lineTo(ptpolygon3.x, ptpolygon3.y);
pathpolygon.lineTo(ptpolygon4.x, ptpolygon4.y);
Paint paintpolygon=new Paint();
paintpolygon.setStyle(Style.FILL);
paintpolygon.setStrokeWidth(10);
paintpolygon.setColor(Color.BLUE);
paintpolygon.setAntiAlias(true);
paintpolygon.setStrokeCap(Cap.ROUND);
paintpolygon.setStrokeJoin(Join.ROUND);
canvas.drawPath(pathpolygon, paintpolygon);
}
OverlayDemo.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:MarkerDragForTencentMap
作者:
评论列表
文章目录