How do I set the zoom level to show all the markers on Google Maps?
In my Google Map there are different markers in different positions. I want to set google map zoo
If you are using API version 3 you can replace
map.setCenter(markerBounds.getCenter(), map.getBoundsZoomLevel(markerBounds));
with
map.fitBounds(markerBounds).