0

I want to add a line from the center to the border of a circle.

I have already drawn the circle with:

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

Now I want to draw the line...

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

The problem is that I do not know how to get the border point of the circle.

How could I draw the line from center to border of the circle and how could it spin in the circle like a radar ?

enter image description here

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
ninjaxelite
  • 1,139
  • 2
  • 20
  • 43

1 Answers1

0

Achieved it by using GroundOverlay

groundOverlay = googleMap.addGroundOverlay(new GroundOverlayOptions()
     .image(BitmapDescriptorFactory.fromResource(R.drawable.radar_line))
     .position(point, radius*2)
     .transparency(0.7f)
     .bearing(radarRadius));
ninjaxelite
  • 1,139
  • 2
  • 20
  • 43