I would like to restrict zoom levels in OpenLayers for a Google Map. A Bing example shows how to limit the extent of the Bing tiles:
var road3 = new OpenLayers.Layer.Bing({
name: "Road tiles with 3 zoom levels",
type: "Road",
key: apiKey,
maxResolution: 76.43702827453613,
numZoomLevels: 3
});
But I cannot find a Google example which does this same thing in OpenLayers.
Found OpenLayersAndGoogleMapOverlays but didn't work. I used it to build this Fiddle which also doesn't work.
Best Answer
pacofvf: I cleaned up the solution and it can be accessed here. Most of the code is also pasted below: