Google Android Map v2 Drawing Circle

Google, February 26th, released Circle as a type of overlay:

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

But how can I update the new version of Google Map V2? When will it be available in the Android SDK Manager? I have a previous Google Map V2 library in the Google Play Services section (Rev. 5) that DOES NOT include the Circle class

+7
source share
1 answer

To update Google MAP V2:

Open the Android SDK Manager -> Go to Advanced Features -> Check for an update to Google Play Services . if it does not show an available update, go to "Packages-> Reboot". upgrade your Google play service to version 5 .

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

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 the February 2013 Release Notes .

EDIT: These are June 2016 release notes. Now you can make the circles round, which can be useful if you want to do some kind of action with the circle.

+36
source

All Articles