Waheed Waheed - 7 months ago 55
Android Question

Android- Google map v2 Draw circle

Google in Feb 26 released Circle as an overlay type.

But how to update to the new release of Google Map V2? When it will be available in Android SDK Manager? I've the previous Google Map V2 library within "Google Play Services" (Rev. 5) which is NOT include "Circle" class


To update Google MAP V2:

Open Android SDK Manager -> Go to Extras -> Check for the update of Google Play Service. if it doesn't shows the update available, then go to Packages->Reload. update the google play service to Revision 5.

After that remove the old Google Play Service Library project from Eclipse Workspace. import it again. add this library project in your current project. now u will have the Circle class available under com.google.android.gms.maps.model package. and you can use that to add circle in your map.

To Add Circle:

mMap.addCircle(new CircleOptions()
        .center(new LatLng(location.getLatitude(), location.getLongitude()))

And FYKI This is Release note for changes of February 2013.

EDIT : This is Release notes for June 2017. You can now make the circles clickable, which may be helpful if you want to do some action with circle.