Hi, On Fri, Jul 3, 2009 at 11:19 PM, Axel Müller<[email protected]> wrote: > Based on some parameters I change the zoom level using > map.setCenter(lonlat, zoom). > This works perfectly for OSM Mapnik layer but not for Google layer where > the pan zoom bar reflects the new zoom level but the map itself still > shows the previous zoom level. Am I missing something? > > osmLayer = new OpenLayers.Layer.OSM.Mapnik("Mapnik"); > gMapLayer = new OpenLayers.Layer.Google("Google Maps", {numZoomLevels: > 20, isBaseLayer: true });
Using Google layers like this only works in a few use cases. You have to use Spherical Mercator to make it behave like you are expecting. See http://docs.openlayers.org/library/spherical_mercator.html for explanation, tutorial and howto. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
