code: function(pointFeatures, options) {
          if (pointFeatures.length < 2) {
              throw new Error("At least two point features have to be added to " +
                              "create a line from");
          }
          
          var lines = new Array(pointFeatures.length-1);
          
          var pointFeature, startPoint, endPoint;
          for(var i=0, len=pointFeatures.length; i<len; i++) {
              pointFeature = pointFeatures[i];
              endPoint = pointFeature.geometry;
              
              if (!endPoint) {
                var lonlat = pointFeature.lonlat;
                endPoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
              } else if(endPoint.CLASS_NAME != "OpenLayers.Geometry.Point") {
                  throw new TypeError("Only features with point geometries are supported.");
              }
              
              if(i > 0) {
                  var attributes = (this.dataFrom != null) ?
                          (pointFeatures[i+this.dataFrom].data ||
                                  pointFeatures[i+this.dataFrom].attributes) :
                          null;
                  var style = (this.styleFrom != null) ?
                          (pointFeatures[i+this.styleFrom].style) :
                          null;
                  var line = new OpenLayers.Geometry.LineString([startPoint,
                          endPoint]);
                          
                  lines[i-1] = new OpenLayers.Feature.Vector(line, attributes,
                      style);
              }
              
              startPoint = endPoint;
          }
  
          this.addFeatures(lines, options);
      }
docs: Constructor: OpenLayers.PointTrack
  Constructor for a new OpenLayers.PointTrack instance.
  
  Parameters:
  name     - {String} name of the layer
  options  - {Object} Optional object with properties to tag onto the
  instance.
   
  APIMethod: addNodes
  Adds point features that will be used to create lines from, using point
  pairs. The first point of a pair will be the source node, the second
  will be the target node.
  
  Parameters:
  pointFeatures - {Array(<OpenLayers.Feature>)}
  options - {Object}
  
  Supported options:
  silent - {Boolean} true to suppress (before)feature(s)added events