I have an OpenLayers project that is using Google Maps for the base layer. Maybe I'm going about this the wrong way, but I think what I'm trying to do is pretty simple. I just need to set the minimum zoom level of a Google map dynamically based on a given bounding box.
This document describes how to set zoom levels, but it seems that for 3rd party layers like Gmaps, you can't use the minExtent/maxExtent features (this would be ideal).
Also, is there a way to figure out which Google zoom level corresponds to a given bounding box before the map is initialized?
... but this throws an exception if called before the map is initialized. I can call it after the map is initialized, but then there seems to be no way to set the minZoomLevel on the Gmap without completely borking the zoom consistency between layers and ending up with something like this (where there is clearly no zoom consistency between layers):