I have a set of points I want to plot on an embedded Google Map (API v3). I\'d like the bounds to accommodate all points unless the zoom level is too low (i.e., zoomed out
For me the easiest solution was this:
map.fitBounds(bounds); function set_zoom() { if(map.getZoom()) {map.setZoom(map.getZoom() - 1);} else {setTimeout(set_zoom, 5);} } setTimeout(set_zoom, 5);