I am using clustering for maker representation on map. But when user click on any cluster item. It bounds all latlng within cluster. this is my code:
@Override
public boolean onClusterClick(Cluster<MapMakerModel> cluster) {
String firstName = cluster.getItems().iterator().next().getTitle();
showSnackbar(cluster.getSize() + " (including " + firstName + ")");
// Zoom in the cluster. Need to create LatLngBounds and including all the cluster items
// inside of bounds, then animate to center of the bounds.
// Create the builder to collect all essential cluster items for the bounds.
LatLngBounds.Builder builder = LatLngBounds.builder();
for (ClusterItem item : cluster.getItems()) {
builder.include(item.getPosition());
}
// Get the LatLngBounds
final LatLngBounds bounds = builder.build();
// Animate camera to the bounds
try {
mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100));
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
so when this code is called it bound all latlng within that cluster.that is right but it also rotate camera from user angle to NS angle which I don't want to do. How I can archive this??