I have two markers on a map that should both show at the same time.
This is achieved through :
final LatLngBounds.Builder builder = new LatLngBounds.Builder();
for (Marker markerTemp : markers) {
builder.include(markerTemp.getPosition());
}
this works fine. However, when the markers are close to each other the map is very zoomed out. This is how it happens: 1- I choose two locations that are close to each other (zoom is good) 2- I choose two locations that are far from each other (zoom is good) 3- I choose two locations which are close to each other (zoom stays the same and the markers over lap).
I have checked so many links including:
(1) https://stackoverflow.com/questions/34247347/initialize-google-map-to-zoom-to-bounds (2) bounds google maps
(3) Setting max zoom level in google maps android api v2 (4) Android map v2 zoom to show all the markers
(5) Adjusting google map (api v2) zoom level in android (6) Set a max zoom level on LatLngBounds builder