code: function(center, zoom, layers) {
          center = center || this.map.getCenter();
            
          var params = OpenLayers.Util.getParameters(this.base);
          
          // If there's still no center, map is not initialized yet. 
          // Break out of this function, and simply return the params from the
          // base link.
          if (center) { 
  
              //zoom
              params.zoom = zoom || this.map.getZoom(); 
  
              //lon,lat
              var lat = center.lat;
              var lon = center.lon;
              
              if (this.displayProjection) {
                  var mapPosition = OpenLayers.Projection.transform(
                    { x: lon, y: lat }, 
                    this.map.getProjectionObject(), 
                    this.displayProjection );
                  lon = mapPosition.x;  
                  lat = mapPosition.y;  
              }       
              params.lat = Math.round(lat*100000)/100000;
              params.lon = Math.round(lon*100000)/100000;
      
              //layers        
              layers = layers || this.map.layers;  
              params.layers = '';
              for (var i=0, len=layers.length; i<len; i++) {
                  var layer = layers[i];
      
                  if (layer.isBaseLayer) {
                      params.layers += (layer == this.map.baseLayer) ? "B" : "0";
                  } else {
                      params.layers += (layer.getVisibility()) ? "T" : "F";           
                  }
              }
          }
  
          return params;
      }
docs: APIMethod: createParams
  Creates the parameters that need to be encoded into the permalink url.
  
  Parameters:
  center - {<OpenLayers.LonLat>} center to encode in the permalink.
  Defaults to the current map center.
  zoom - {Integer} zoom level to encode in the permalink. Defaults to the
  current map zoom level.
  layers - {Array(<OpenLayers.Layer>)} layers to encode in the permalink.
  Defaults to the current map layers.
  
  Returns:
  {Object} Hash of parameters that will be url-encoded into the
  permalink.