code: function(features) {
          var collection, geometry, isCollection;
          if (features.constructor == Array) {
              collection = features;
              isCollection = true;
          } else {
              collection = [features];
              isCollection = false;
          }
          var pieces = [];
          if (isCollection) {
              pieces.push('GEOMETRYCOLLECTION(');
          }
          for (var i=0, len=collection.length; i<len; ++i) {
              if (isCollection && i>0) {
                  pieces.push(',');
              }
              geometry = collection[i].geometry;
              pieces.push(this.extractGeometry(geometry));
          }
          if (isCollection) {
              pieces.push(')');
          }
          return pieces.join('');
      }
docs: APIMethod: write
  Serialize a feature or array of features into a WKT string.
  
  Parameters:
  features - {<OpenLayers.Feature.Vector>|Array} A feature or array of
  features
  
  Returns:
  {String} The WKT string representation of the input geometries