Let’s start,

We already created a Google Map with Marker in my article. If you did not create this please follow this link,

After creating Google Map with Marker App in Xamarin Android, then follow the below steps,

Step 1: Open MainActivity.cs page, then give following code,

Name Space:

  1. using Android.Gms.Maps.Model; // Add this Two Name Space
  2. using Android.Graphics;

C# Code:

  1. public void OnMapReady(GoogleMap googleMap)
  2. {
  3. this.GMap = googleMap;
  4. GMap.UiSettings.ZoomControlsEnabled = true;
  5. DrawCircle(GMap); //Calling Draw Circle
  6. LatLng latlng = new LatLng(Convert.ToDouble(13.0291), Convert.ToDouble(80.2083));
  7. CameraUpdate camera = CameraUpdateFactory.NewLatLngZoom(latlng, 15);
  8. GMap.MoveCamera(camera);
  9. MarkerOptions options = new MarkerOptions()
  10. .SetPosition(latlng)
  11. .SetTitle("Chennai");
  12. GMap.AddMarker(options);
  13. }
  14. public void DrawCircle(GoogleMap gMap)
  15. {
  16. Circle circle;
  17. var CircleMaker = new CircleOptions();
  18. var latlong = new LatLng(13.0291, 80.2083); //Location
  19. CircleMaker.InvokeCenter(latlong); //
  20. CircleMaker.InvokeRadius(1000); //Radius in Circle
  21. CircleMaker.InvokeStrokeWidth(4);
  22. CircleMaker.InvokeStrokeColor(Android.Graphics.Color.ParseColor("#e6d9534f")); //Circle Color
  23. CircleMaker.InvokeFillColor(Color.Argb(034, 209, 72, 54));
  24. CameraUpdate camera = CameraUpdateFactory.NewLatLngZoom(latlong, 15); //Map Zoom Level
  25. circle = GMap.AddCircle(CircleMaker); //Gmap Add Circle
  26. }

Step 2: Next Run the app showing Drawing Circle in Around Marker with Google Map,

Finally, we have successfully created Xamarin Android Google Map Draw Circle around Marker App.

Read more articles on Xamarin: