title: How to add multiple markers and infowindow using Javascript
body: <p>I am using Google map API V3 to draw routes. I am having 'LatLng' array and I am looping this array to plot route on map.and I also need to add markers and infowindow for each address. I am getting markers on the map, But info window dose not work, Here is my Code.</p>
  
  <pre><code>for(i=0;i&lt;s[0].length;i++)
  {
  marker[count] = new google.maps.Marker({
                      position: s[0][i]["location"],
                      map: map
                  });
  
  
  
  marker[count].info = new google.maps.InfoWindow({
            content: '&lt;b&gt;Speed:&lt;/b&gt; '
          });
  
   google.maps.event.addListener(marker[count], 'click', function() 
    {
       marker[count].info.open(map, marker[count]);
    });
  
  count++;
  
  }
  </code></pre>