I have implemented Google Maps in my app and have added 2 markers on it.
Here's how:
LatLng mainUserLocation = new LatLng(Double.valueOf(currentLt), Double.valueOf(currentLn));
mMap.addMarker(new MarkerOptions().position(mainUserLocation).title("You"));
mMap.moveCamera(CameraUpdateFactory.newLatLng(mainUserLocation))
mMap.animateCamera(CameraUpdateFactory.zoomTo(20), 2000, null);
LatLng otherPlayersLocation = new LatLng(currentLtAU, currentLnAU);
mMap.addMarker(new MarkerOptions().position(otherPlayersLocation).title(nameAU));
The problem is that the camera is zooming and getting focused on one marker and the other marker is getting out of sight!
I want both of the markers or all the markers to remain in sight. How to achieve this?
Please let me know.