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});

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?

1 Answer 1


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.

  • Thanks, choosing terrain was the problem. When I switched to road or satellite and changed numZoomLevels: 20 it seemed to work fine!
    – djq
    Aug 26, 2012 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.