title: Google map's polylines not displaying correctly
body: <p>I am trying to add polylines to a map but they are not appearing when called to do so</p>
  
  <p>Here is some of my code:</p>
  
  <pre><code>var waypts = [];
  var plyLine;
     function initialize() {
  
      plyLine = new google.maps.Polyline({
      path: waypts,
      geodesic: true,
      strokeColor: '#FF0000',
      strokeOpacity: 1.0,
      strokeWeight: 2
      });   
  }
  </code></pre>
  
  <p>This function is called in an onclick listener</p>
  
  <pre><code>function setWaypts()
  {
      waypts = [];
      plyLine.setMap(null);
      for (var i = 0; i &lt; (poiArrayList.length); i++) {
              waypts.push(new google.maps.LatLng(poiArrayList[i].mark.getPosition().lat(), poiArrayList[i].mark.getPosition().lng()))             
          };  
      plyLine.setMap(map);
  }
  </code></pre>
  
  <p>This is what the log(mark.getPosition()) prints out:</p>
  
  <p>Uncaught Error: (51.88804094128838, -8.506078720092773)</p>
  
  <p>Can anybody stop if I did something wrong with my code?</p>
  
  <pre><code>    function poi(id, name, description, mark, inv) {
          this.id = id;
          this.name = name;
          this.description = description;
          this.mark = mark;
          this.inv = inv;
      }
          var marker = new google.maps.Marker({
              position: location,
              draggable: false,
              map: map,
              id: markerId,
              icon: iconUrl
          });
  </code></pre>