title: openlayers multiple separate lines on layer
body: <p>I am trying to draw separate line segments on a single layer in using Openlayers. The site can be seen <a href="http://cs.mwsu.edu/MapMatching/ViewContainers/?Route=input_01.txt&amp;submit=ViewRoute" rel="nofollow">Here</a> (click the map then zoom in). The red boxes represent a quad-tree containing road segments. And the green line shows up as a single polyline, and I would like it to be viewed as individual segments.</p>
  
  <h2>Here is my existing function</h2>
  
  <pre><code>    function DrawSegments(response){
          var SegmentsData = eval( '(' + response.responseText + ')' );
  
          var line;
          var lineFeature;
  
          if(segmentsLayer)       
              segmentsLayer.destroy();
  
          segmentsLayer = new OpenLayers.Layer.Vector("Segments"); 
  
          var points = new Array();
  
          var style = { strokeColor: '#00ff00', 
                      strokeOpacity: 0.8,
                      strokeWidth: 2
          };  
  
          map.addLayer(segmentsLayer);                    
          map.addControl(new OpenLayers.Control.DrawFeature(segmentsLayer, OpenLayers.Handler.Path));                                     
  
          //Used this block as code example to possibly add lines using a WKT geometry collection
          //var feature = new OpenLayers.Feature.Vector(
              //OpenLayers.Geometry.fromWKT(
                  //"POLYGON((28.828125 0.3515625, 132.1875 -13.0078125, -1.40625 -59.4140625, 28.828125 0.3515625))"
              //).transform(WGS,SMP)
          //);
          //segmentsLayer.addFeatures([feature]);
  
          for (var i = 0; i &lt; SegmentsData.length; i++) {         
              points.push(new OpenLayers.Geometry.Point(SegmentsData[i][0], SegmentsData[i][1]).transform(WGS,SMP));
              points.push(new OpenLayers.Geometry.Point(SegmentsData[i][2], SegmentsData[i][3]).transform(WGS,SMP));
              line = new OpenLayers.Geometry.LineString(points);              
              lineFeature = new OpenLayers.Feature.Vector(line, null, style);                 
          }
          segmentsLayer.addFeatures([lineFeature]);           
      }   
  </code></pre>
  
  <h2>I've tried:</h2>
  
  <p>Finding examples for </p>
  
  <p><code>OpenLayers.Geometry.MultiLineString</code>and 
  <code>OpenLayers.Geometry.Collection</code> </p>
  
  <p>I've tried turning the lineFeature var into an array and adding each array element separately with no luck. Documentations not helping me. 
  Any help would be greatly appreciated. </p>