I'd like to set map bounds (i.e. a setZoom + setCenter) in order to be included in a given box.
Let's have a fixed center,
function includeBounds(minLat, minLng, maxLat, maxLng) {
var center = new google.maps.LatLng((minLat + maxLat) / 2, (minLng + maxLng) / 2);
var zoom = someMagicFunction(center, minLat, minLng, maxLat, maxLng);
map.setCenter(center);
map.setZoom(zoom);
at this point I'd like to have the map centered in 'center' and with a zoom level such
that map.getBounds() are INCLUDED in the box defined by [minLat, minLng] - [maxLat, maxLng]
}
Any idea?
Many thanks in advance!