I am trying to add multiple polygons to a map by touch click, but I can only add one. If I click on the screen to create, it fills the new coordinate in the previous polygon.
map1.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
@Override
public void onMapClick(LatLng latLng) {
coorNoGo.add(latLng);
PolygonOptions polygonOptions = new PolygonOptions();
polygonOptions.fillColor(Color.RED);
polygonOptions.addAll(coorNoGo);
Polygon NoGo = map1.addPolygon((polygonOptions));
}
});