Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I use Google Maps v3 in my application and I noticed a strange behavior, When I refresh the web page, the map zoomed out to display the whole map then get back to the zoom level I specify in my code. This happen fast but every time I refresh the page. How can I fix it?


Part of mu code:

var geographic = new OpenLayers.Projection("EPSG:4326");
var mercator = new OpenLayers.Projection("EPSG:3857");
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34).transform(geographic,mercator);

map = new OpenLayers.Map('map',{
        projection: new OpenLayers.Projection('EPSG:3857'), 
        displayProjection: new OpenLayers.Projection("EPSG:4326")

 gmap = new OpenLayers.Layer.Google("Google",{ numZoomLevels: 20});  
share|improve this question
Can we see the live code it is much easier to debug using firebug. – Mapperz Apr 30 '13 at 18:40
Edited my post. Thanks! – Shadin May 1 '13 at 15:01
Your example doesn't even run up correctly: - you cannot zoom, move the map etc. And you specify no zoom level! I guess numZoomLevels is something else and also cannot be found in the documentation – Tomas Jun 28 '13 at 8:02

Your Answer


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

Browse other questions tagged or ask your own question.