code: function(group, map)
  	{
  	    if (!lang.isObject(map))
  		map = WireIt.GroupUtils.getMap(group);
  		
  	    var fieldConfigs = [];
  	    var terminalConfigs = [];
  	    var generateExternal = function(ftMap)
  		{
  		    for (var cI in ftMap)
  		    {
  			var c = ftMap[cI];
  			
  			for (var fName in c.fields)
  			{
  			    var fMap = c.fields[fName];
  			    
  			    if (fMap.visible)
  			    {
  				var fc = {};
  				lang.augmentObject(fc, fMap.fieldConfig);
  				
  				fc.name = fMap.externalName;
  				fc.label = fMap.externalName;
  				lang.augmentObject(fc, fMap.fieldConfig)
  				
  				fieldConfigs.push(fc);
  			    }
  			}
  		    
  			for (var tName in c.terminals)
  			{
  			    var tMap = c.terminals[tName];
  			    
  			    if (tMap.visible)
  			    {
  				var tc = {};
  				tc.name = tMap.externalName;
  				tc.side = tMap.side;
  				
  				lang.augmentObject(tc, tMap.terminalConfig);
  				
  				terminalConfigs.push(tc)
  			    }
  			}
  		    }
  		}
  	    
  	    if (lang.isValue(map.groupContainerMap))
  		generateExternal([map.groupContainerMap])
  	    else
  	    {
  		generateExternal(map.containerMap);
  		generateExternal(map.groupMap);
  	    }
  	    
  	    var center = this.workOutCenter(group);
  	    
  	    return { "fields" : fieldConfigs, "terminals" : terminalConfigs, "position" :  center, "center" : center};
  	}
docs: Get the configuration to pass to a group container
  @param {WireIt.Group} group The group to get the config for
  @param {object} map Optional The group's map (obtained by WireIt.GroupUtils.getMap(group))
  @return {object} The collapsed config