Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '12 at 18:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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