7
votes

Google, on Feb 26, released Circle as an overlay type:

https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/Circle

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

1
Not related to question, but are there any release notes for this release? Really interested what else they changed with this release - Pavel Dudka
This library may help - github.com/i-schuetz/map_areas - User

1 Answers

36
votes

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()))
        .radius(100)
        .strokeColor(Color.RED)
        .fillColor(Color.BLUE));

And for your information, this is Release note for changes of February 2013.

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