title: Configuring maxExtent and restrictExtent coordinates in OpenLayers
body: <p>I'm very new to OpenLayers and working with GeoData; as such, I think I have a pretty noob question about configuring map bounds with OpenLayers. First, here's the map code I've made up...</p>
  
  <pre><code>function createMap(containerId){         
              return new OpenLayers.Map(containerId, {
                  projection: new OpenLayers.Projection("EPSG:900913"),
                  displayProjection: new OpenLayers.Projection("EPSG:4326"),
                  units: "m",
                  maxResolution:156543.0339,
                  numZoomLevels:4,
                  controls: [],
                  maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),
                  restrictExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)
              });
  }
  </code></pre>
  
  <p>I have my map and I've loaded a GeoJSON layer of vector country shapes on top of it. So far so good. However, if I call <code>zoomToMaxExtent</code> on the map, the map zooms out to be a little tiny thumbnail-sized graphic in the center of my viewport rather than filling the frame. Then if I zoom in on the map, I can (seemingly) pan the map indefinitely in any direction rather than being constrained at the edges of the map shapes.</p>
  
  <p>So I assume I'm doing something wrong with my <code>maxExtent</code> and <code>restrictExtent</code> settings, although I have no idea what it is. To be honest, I'm not sure what those huge bounding numbers are (found them in sample code). Essentially, by Lon/Lat coordinates, I think I'm just trying to restrict bounding to -180, -90, 180, 90 – which should provide a tight frame around the map geography, right? Unfortunately setting those Lon/Lat's to the bounding params don't seem to do anything. Any insight would be greatly appreciated!</p>