Android – Draw circle of certain radius on map view in Android

androidgeometrygoogle maps

I want to draw a circle on map view. I want the user to input the radius and for that radius I have to show circle on map. After that I have to display markers on some locations on that circle.

I know how to display markers on on map view.

How can I draw circle on map view and to show markers on that circle boundary.

Best Answer

Just to bring this up to date... they've made it very easy to do on Google Maps API v2.

    mMap.addCircle(new CircleOptions()
        .center(center)
        .radius(radius)
        .strokeWidth(0f)
        .fillColor(0x550000FF));

Where radius is in meters.

As for markers on the boundary, that should be relatively easy to do - just follow the 'Circles' Demo in the Google Maps sample code here: https://developers.google.com/maps/documentation/android/intro#sample_code