hi currently im working on a google maps app.
and i want the following effect:
To do this i was thing of first creating a polygon overlay over the country, following by adding a hole to this polygon for the highlighted area with a certain KM radius, so that it shrinks and expands when zooming.
Now i know how to create a polygon;
mMap.addPolygon(new PolygonOptions().addAll(sCountryBorder).fillColor(0xcc000000));
Now i want to add a hole to this polygon, but i dont know how to generate a circular hole with the correct radius.
mMap.addPolygon(new PolygonOptions().addAll(sCountryBorder).fillColor(0xcc000000).addHole({CIRCULAR_HOLE}));
I know it is possible to create a circle with a certain radius in Google maps is it also possible to somehow convert this into an Array of LatLng objects?
mMap.addCircle(new CircleOptions()
.center(newLocation)
.radius(mRadius.size)
.strokeWidth(0)
.fillColor(getResources().getColor(R.color.transparant)));