I am starting with maps but I am a beginner.
I cannot figure out why to use maxExtent. If I delete it from my application, its behavior doesn't change or I do not notice.
So why should I use it?
I understand purpose of restrictedExtent but not of maxExtent.
var extent = new OpenLayers.Bounds(-2003750.34, -2003750.34, 2003750.34, 2003750.34);
map = new OpenLayers.Map("map", {
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.LayerSwitcher()],
maxExtent: extent,
//restrictedExtent: extent,
maxResolution: 156543.0399,
numZoomLevels: 19,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
var osm = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { 'attribution': 'Provided by blop' });
var gmap = new OpenLayers.Layer.Google("Google Streets", { visibility: false });
map.addLayers([osm, gmap]);