title: why my array isn't working correctly [Google Map Api V3 ]
body: <p>so i'm trying to do is when user click on the marker and  it will link user to the particular URL, but there's something wrong with it, it only link to the last array URL. may i know why ? </p>
  
  <pre><code> for (var key in places){
              var myPlace = places[key];
              if (myPlace) {
                  var marker = new google.maps.Marker({
                      map: map,
                      url:myPlace.infowin_html,
                      position: new google.maps.LatLng(myPlace.position.lat, myPlace.position.lng)
                  });
                  createTooltip(marker, key); 
                  google.maps.event.addListener(marker, 'click', function() {
                  window.location.href=marker.url;
              }); 
  
  
          }
  
  
      } 
  </code></pre>
  
  <p>my js  </p>
  
  <pre><code>var places =Array();
  places.push({
  infowin_html:"https:www.facebook.com",
  tooltip_html:"&lt;div&gt;&lt;img       src='http://upload.wikimedia.org/wikipedia/commons/thumb/7/76/Habs_flw_oak_park_home.jpg/220px-Habs_flw_oak_park_home.jpg' width='220' hieght='174' /&gt;&lt;/div&gt;&lt;h3&gt;Chow Kit, KL&lt;/h3&gt;&lt;div&gt;&lt;stong&gt;Population:&lt;/strong&gt; 52k&lt;/div&gt;Click for more..", 
  position:{lat:3.1597, lng:101.7000}
  });
  
  places.push({
  infowin_html:"https:www.facebook.com",
  tooltip_html:"&lt;h3&gt;Subang Jaya, Selangor&lt;/h3&gt;&lt;div&gt;&lt;stong&gt;Population:&lt;/strong&gt; 2.7m&lt;/div&gt;Click for more..",
  position:{lat:3.0394, lng:101.5878}
  });
  
  places.push({
  infowin_html:"https:www.facebook.com",
  tooltip_html:"&lt;h3&gt;Puchong Jaya, Selangor&lt;/h3&gt;&lt;div&gt;&lt;stong&gt;Population:&lt;/strong&gt; 74k&lt;/div&gt;Click for more..",
  position:{lat:3.0113, lng:101.6115}
  });
  
  places.push({
  infowin_html:"asd",
  tooltip_html:"&lt;h3&gt;Cyberjaya, Selangor&lt;/h3&gt;&lt;div&gt;&lt;stong&gt;Population:&lt;/strong&gt;   55k&lt;/div&gt;Click for more..",
  position:{lat:2.9225, lng:101.6550}
  });
  </code></pre>
  
  <p>what i get is "asd" URL .</p>