因此,我在我的draw方法中使用以下代码在Android地图中绘制了这个三角形:
paint.setARGB(255, 153, 29, 29);
paint.setStyle(Paint.Style.FILL_AND_STROKE);
paint.setAntiAlias(true);
Path path = new Path();
path.moveTo(point1_returned.x, point1_returned.y);
path.lineTo(point2_returned.x, point2_returned.y);
path.moveTo(point2_returned.x, point2_returned.y);
path.lineTo(point3_returned.x, point3_returned.y);
path.moveTo(point3_returned.x, point3_returned.y);
path.lineTo(point1_returned.x, point1_returned.y);
path.close();
canvas.drawPath(path, paint);
pointX_returned是我从字段中获取的坐标。它们基本上是经度和纬度。结果是一个漂亮的三角形,但内部人员为空,因此我可以看到地图。有办法以某种方式填充它吗?