Skip to content

Instantly share code, notes, and snippets.

@iammert
Created August 24, 2016 08:05
Show Gist options
  • Save iammert/62b39c4f76e9690bed23910e2ce0c203 to your computer and use it in GitHub Desktop.
Save iammert/62b39c4f76e9690bed23910e2ce0c203 to your computer and use it in GitHub Desktop.
LatLngBounds.java
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