title: Uncaught TypeError: Cannot set property 'infoWindow' of undefined
body: <p>I am trying to merge some code from an old map into a new map and I am getting the error "Uncaught TypeError: Cannot set property 'infoWindow' of undefined" referring to this line </p>
  
  <pre><code>polygon.infoWindow = new google.maps.InfoWindow({content: html});
  </code></pre>
  
  <p>From this snippet below. I have infoWindow defined at the top of the script but, for brevity didn't include it.</p>
  
  <pre><code>geoXml.parseKmlString("&lt;Placemark&gt;&lt;name&gt;"+name+"&lt;/name&gt;"+kml+"&lt;/Placemark&gt;");
         var html = "&lt;strong&gt;" + event + "&lt;/strong&gt;&lt;br&gt;Issued For: " + area + "&lt;br&gt;Expires: " +dtstring;
         var polygon = geoXml.docs[0].gpolygons[0];
         polygon.infoWindow = new google.maps.InfoWindow({content: html});
  
         google.maps.event.addListener(polygon, 'mouseover', function(e) {
               var latLng = e.latLng;
                   this.setOptions({fillOpacity:0.80});
                   polygon.infoWindow.setPosition(latLng);
                   polygon.infoWindow.open(map);
          });
  </code></pre>