title: Google maps - show marker window from result list
body: <p>code</p>
  
  <pre><code>//array store the markers
  
  var googleMarker = [];
  
  //this function get json object with the marker data
  //place name,place id,place address.
  
  function AjaxGetUserToPlaces(res)
  {
      var l = res.value.length; 
  
      for(var i=0;i&lt;l;i++)
      {
          var point = new GLatLng(res.value[i].lng,res.value[i].lat)
          map.addOverlay(createMarkerInfo(i,point,res.value[i].placeName,res.value[i].placeId));
          polylineArray.push(point);
      }
  }
  
  //the function create the openWindow for the marker.
  
  function createMarkerInfo(i,latlng , placeName,placeId)
   {
      var marker = new GMarker(latlng);
      marker.value = placeId;
  
      GEvent.addListener(marker, 'click', function()
      { 
      marker.openInfoWindowHtml(''+
      '&lt;a href='+baseUrl+'ui/pages/place/place.aspx?plid='+placeId+'&gt;'+placeName+'&lt;/a&gt;');
          });
          googleMarker[i] = marker
  
      return marker;
  }
  
  
  
  //this function occur when user click on one of the result.
  //it gets the number in the array googleMarker.
  
  function showMarkerInfoWindow(i)
  {
  
  //here i want to open the marker info window.
  //pay attention, i dont have the html to put inside the infowindow
  //i want just to show the infowindoe with the exising html 
  //that created prevusly from the function createMarkerInfo
  
       googleMarker[i].openInfoWindowHtml();
  }
  </code></pre>