Code example for PolygonOptions

		// Remove previously drawn rect 
		if (rect != null) rect.remove();
		// Add rectangle to the map 
		rect = map.addPolygon(new PolygonOptions()
		    .add(c1,c2,c3,c4) // 4 corners, ccw
		// Set coordinates that will be passed back to the group creation activity 
		gps1.setLatitude(c1.latitude); gps1.setLongitude(c1.longitude);
		gps2.setLatitude(c3.latitude); gps2.setLongitude(c3.longitude);
		// Top left marker 
		if (m1 != null) m1.remove();
		m1 = map.addMarker(new MarkerOptions()
Connect your IDE to all the code out there  Get Codota for Java