title: Google map goes blank when triggering click event outside
body: <p>I have created a google map using V3 js API, and inside the map I am showing multiple markers. When I am clicking on a markers it does an ajax call and shows the result in the infowindow. I have added an external link outside the map, clicking on which it will display the corresponding marker result in side the map. I have used the below code to do the functionality..</p>
  
  <pre><code>$('#marker_link').click(function () {
      var longitude = $(this).find("#longitude").val();
      var latitude = $(this).find("#latitude").val();
      var index = $(this).find("#index").val();
  
      google.maps.event.trigger(gmarkers[index], "click", {
          latLng: new google.maps.LatLng(latitude, longitude)
      });
  });
  </code></pre>
  
  <p>This code is pulling the marker data correctly and showing in a window. But at that time the map goes blank. How can we fix it. How can we keep the map along with the store result.</p>
  
  <p>Here gmarkers[ ] is a global array where I am keeping all the markers that are created during the map is rendered.</p>
  
  <p>The below code I have used while showing markers in the map for the first time.</p>
  
  <pre><code>var marker = new google.maps.Marker({
                                      map: map,
                                      position: new google.maps.LatLng(pLat, pLong),
                                  });
                                  gmarkers.push(marker);
  
                                  google.maps.event.addListener(marker, 'click', function (event) {
  
  
                                      var dataString = 'store_id=' + {{ store.store_id }}
                                      $.ajax({  
                                          type: "GET",  
                                          url: GET_STORE_DATA,  
                                          data: dataString, 
                                          success: function(res) { 
                                              if(res != '') {
                                                  var contentString = res;
                                                  var infoWindow = new google.maps.InfoWindow({ content: contentString });
  
                                                  infoWindow.setPosition(event.latLng);
                                                  infoWindow.open(map);
                                                  google.maps.event.addListener(map, 'click', function() {
                                                      infoWindow.close();
                                                  });
                                              } else {
                                                  alert('No data found')
                                              }
                                          }  
                                      });
                                  });
  </code></pre>