I have a map with many markers for places. I want to draw an overlay around all map with a black transparent color, and a circle around those markers which is fully transparent to show them. Like the attached picture.
I know how to add an overlay view, but I don't know how to add the middle circle while keeping the overlay colored.
If I use Circle
then only the circle is colored, and not rest of map.
I also tried to draw something like this but yea won't work ^^.
int d = 500; // diameter
Bitmap bm = Bitmap.createBitmap(d, d, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(bm);
Paint p = new Paint();
p.setColor(getResources().getColor(R.color.colorAccent));
c.drawCircle(d / 2, d / 2, d / 2, p);
// generate BitmapDescriptor from circle Bitmap
BitmapDescriptor bmD = BitmapDescriptorFactory.fromBitmap(bm);
// mapView is the GoogleMap
googleMap.addGroundOverlay(new GroundOverlayOptions().
image(bmD).
position(latLng, RADIUS_CIRCLE * 2, RADIUS_CIRCLE * 2).
transparency(0.4f));
I am confused and not sure how to work it out. Any help will be appreciated. Thanks.