how to make multiple polygon on Google Map I am using
List data = new Array List();
but its create only o
You can define a common method to draw polygon on google maps like this:
public PolygonOptions addPolygon(ArrayList < LatLng > arg) {
LatLng[] data = arg.toArray();
PolygonOptions polygonOptions;
for (int i = 0; i <= data.length; i++) {
polygonOptions = new PolygonOptions();
polygonOptions.add(data[i], data[i + 1], data[i + 2])).strokeColor(Color.RED).strokeWidth(2);
polygonOptions.fillColor(Color.parseColor("#51000000"));
return polygonOptions;
}
}
and then add it to your GoogleMap like this:
yourGoogleMap.addPolygon(addPolygon(data));