1

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?

EDIT

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});  
 map.addLayers([gmap]); 
  • 2
    Can we see the live code it is much easier to debug using firebug. – Mapperz Apr 30 '13 at 18:40
  • Your example doesn't even run up correctly: jsfiddle.net/XRr6S/2 - 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.