Skip to content

Instantly share code, notes, and snippets.

@iammert
Created August 24, 2016 08:05
Show Gist options
  • Save iammert/a7ff35ed021f2bd7a357b99d83525182 to your computer and use it in GitHub Desktop.
Save iammert/a7ff35ed021f2bd7a357b99d83525182 to your computer and use it in GitHub Desktop.
LatLngBounds.Builder builder = new LatLngBounds.Builder();
for (Marker marker : markers)
builder.include(marker.getPosition());
LatLngBounds bounds = builder.build();
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(bounds, 0);
map.animateCamera(cameraUpdate);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment