[GIS] Openlayers zoom limit with Google Maps

google mapsopenlayers-2satellite

When using Openlayers I am unable to achieve the same zoom level that Google Maps allows. For example, if I embed a Google Map in my web-page I can zoom in to the building level in a city. When using Openlayers, the highest zoom level using a Google Map layer is not at the same resolution (it is always hundreds of buildings at the highest zoom level).

At the moment, my map options are the following:

// map options      
var options = {         
    units: "m",
    numZoomLevels: 16,
    maxResolution: 15654.0339,
    maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)          
};

map = new OpenLayers.Map("map_canvas", options);              

var googleLayer = new OpenLayers.Layer.Google('Google', {type: google.maps.MapTypeId.TERRAIN});
map.addLayer(googleLayer);

I have tried setting the numZoomLevels: 20 and although the map zooms in further, more detailed tiles are not returned from Google. Is there another setting that I should be changing to increase the zoom level?

Best Answer

Terrain MapType has always less zoom levels than roadmap or satellite. When you switch on other maptype you will be able to zoom to higher levels. Check in on main google maps web site. Zoombar is changeing when swithing terrain overlay.