title: How to Create an instance of a polyline in heremaps in javascript?
body: <p>So i was creating a polyline to use it in another place but after creating the instance the polyline is getting al mixed up its may be due to linestring or what? </p>
  
  <pre><code>var points = [
        { lat: 52.5309825, lng: 13.3845921 },
        { lat: 52.5311923, lng: 13.3853495 }];
  
  var linestring = new H.geo.LineString();
  points.forEach(function(point) {
    linestring.pushPoint(point);
  });
  
  // Initialize a polyline with the linestring:
  var routeLine = new H.map.Polyline(linestring);```
  
  [![if i give multiple polyline inputs the previous one is geting attached][1]][1]
  
  Image of mixed output polylines:
    [1]: https://i.stack.imgur.com/jPrHq.png
  </code></pre>