0

我想从中心向圆圈边框添加一条线。从圆圈中心画线,Google Maps API,Android

我已经绘制圆:

circle = googleMap.addCircle(new CircleOptions() 
    .center(point) 
    .radius(radius) 
    .strokeWidth(5.5f) 
    .strokeColor(Color.RED)); 

现在我想划清界线......

polyLine = googleMap.addPolyline(new PolylineOptions() 
    .add(centerPoint, borderPoint) 
    .width(5) 
    .color(Color.RED)); 

的问题是,我不知道怎么弄的边界点的圈子。

我该如何绘制圆的中心到边界的线,以及它如何像雷达一样在圆中旋转?

enter image description here

回答

0

通过使用GroundOverlay

groundOverlay = googleMap.addGroundOverlay(new GroundOverlayOptions() 
    .image(BitmapDescriptorFactory.fromResource(R.drawable.radar_line)) 
    .position(point, radius*2) 
    .transparency(0.7f) 
    .bearing(radarRadius)); 
取得它