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 zoom level based on the range of markers (that means in the view of google map, i want to see all markers)
Best Answer
There you go:
We are creating 10 random points in the above example and then passing each point to
GLatLngBounds.extend()
. Finally we get the correct zoom level withGMap2.getBoundsZoomLevel()
.