LatLngBounds.Builder latLngBuilder = new LatLngBounds.Builder();
for (int i = 0; i < pointsList.size(); i++) {
latLngBuilder.include(pointsList.get(i));
}
LatLngBounds LatLngBuilder = latLngBuilder.build();
final CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(LatLngBuilder, 100);
this.mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {
@Override
public void onMapLoaded() {
mMap.animateCamera(cameraUpdate);
}
});