Java – draw five transparent circles on Google Maps V2 with the current position as the center

See English answers > draw five transparent circles on the Google map V2 1

I also need to display a mark in the center of the circle

I'm trying something like this to draw a circle on Google Maps V2, but it only draws one circle instead of five rings

CircleOptions circleOptions = new CircleOptions()
                  .center(latLng)   //set center
                  .radius(500)   //set radius in meters
                  .fillColor(Color.TRANSPARENT)  //default
                  .strokeColor(0x10000000)
                  .strokeWidth(5);

                  myCircle = googleMap.addCircle(circleOptions);

I need to draw a circle like this –

Can anyone help me? I have a problem creating this circle in Google map v2 Any help would be appreciated

Solution

for(int rad=100;rad<=500;rad+100)
for(int rad=100;rad<=500;rad+100)
{

    CircleOptions circleOptions = new CircleOptions()
              .center(latLng)   //set center
              .radius(rad)   //set radius in meters
              .fillColor(Color.TRANSPARENT)  //default
              .strokeColor(0x10000000)
              .strokeWidth(5);

              myCircle = googleMap.addCircle(circleOptions);
}
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>