code: function(geometry) {
              var kml = this.createElementNS(this.kmlns, "Polygon");
              var rings = geometry.components;
              var ringMember, ringGeom, type;
              for(var i=0, len=rings.length; i<len; ++i) {
                  type = (i==0) ? "outerBoundaryIs" : "innerBoundaryIs";
                  ringMember = this.createElementNS(this.kmlns, type);
                  ringGeom = this.buildGeometry.linearring.apply(this,
                                                                 [rings[i]]);
                  ringMember.appendChild(ringGeom);
                  kml.appendChild(ringMember);
              }
              return kml;
          }
docs: Method: buildGeometry.polygon
  Given an OpenLayers polygon geometry, create a KML polygon.
  
  Parameters:
  geometry - {<OpenLayers.Geometry.Polygon>} A polygon geometry.
  
  Returns:
  {DOMElement} A KML polygon node.