How To Draw A Circle Around Marker on Google Map in Android

Codeplayon
2 min readFeb 18, 2021

How To Draw A Circle Around Marker on Google Map in Android

Hi Developer in these Android article we are implementing google Map accuracy circle around marker. So in these Android blog we are learn How To Draw A Circle Around Marker on Google Map in Android.

First of you can Start you Android studio and make a project and Select a Google map Activity. To draw circle around a pin using Google MAps API v2

Secondly create a google map key for developer console and show your google map and if you have already make these you can just follow these code.

Step : 1 Create a Activity with Select Map Activity.

In you Map activity you can Add a circle method for drawing a circle on marker. and user google map CircleOption for Drow circle.

CircleOptions circleOptions = new CircleOptions();

Used These method to draw a circle Around the marker and Pass the latLong on these method.

private void drawCircle(LatLng point){    // Instantiating CircleOptions to draw a circle around the marker
CircleOptions circleOptions = new CircleOptions();
// Specifying the center of the circle
circleOptions.center(point);
// Radius of the circle
circleOptions.radius(100);
// Border color of the circle
circleOptions.strokeColor(Color.BLACK);
// Fill color of the circle
circleOptions.fillColor(0x30ff0000);
// Border width of the circle
circleOptions.strokeWidth(2);
// Adding the circle to the GoogleMap
mMap.addCircle(circleOptions);
}

source code.

--

--

Codeplayon

Codeplayon - Mobile App Development & SEO Digital Marketing Company , Gurugram & Delhi, visit our website :-https://www.codeplayon.com/ Mobile No:- 9671718285