I have a map that uses the google earth hybrid layer as the base layer. I would
like it so the map is initially zoomed to show the whole world, but I can't
quite figure out how.
My code looks like
var map = new OpenLayers.Map({
div: "map",
projection: 'EPSG:3857',
layers: [
new OpenLayers.Layer.Google("Google Hybrid",{type:
google.maps.MapTypeId.HYBRID, numZoomLevels: 20})
],
center: new OpenLayers.LonLat(0,0).transform('EPSG:4326', 'EPSG:3857')
});
map.zoomToMapExtent();
Do I need to set the map div dimensions to a particular aspect ratio (or a
minimum height/width)?
Also, is there a way to prevent the user from panning when zoomed out all the
way?
Thanks,
Jeff
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users