title: Trigger click on a single geoJSON polygon after load
body: <p>A client has loaded some polygons onto a map using Google Maps APIv3 <code>loadGeoJson()</code> method. I want to be able to search through those polygons and, when one matches a submitted string, zoom/centre on it and trigger a <code>click</code> event, opening the infowindow of that polygon. </p>
  
  <p><a href="https://stackoverflow.com/questions/9397877/get-marker-id-in-google-maps">Some answers hint that</a>, to reference the geoJSON feature, it's <a href="https://stackoverflow.com/questions/31795793/google-maps-javascript-api-access-geojson-feature-property-explicitly">best to use <code>getId()</code></a>, then use that reference to select the polygon on the map. Comes out <code>undefined</code>, and not sure if it would help anyways; few other methods really seem to work (<code>getGeometry()</code> is broken), through <code>getProperty()</code> does. This makes me think maybe I'm iterating over the wrong array. </p>
  
  <p><a href="https://jsbin.com/mafayu/edit?js,console,output" rel="nofollow">This JSBin illustrates what I'm trying to do</a>, especially lines 85-100:</p>
  
  <pre><code>// Trying to search in the layer and trigger an event
  geoJsonLayer.forEach(function(feature) {
    if(searchString===feature.getProperty('letter')) {
      // Match found, Zoom to this feature and pop its infobox
      var foundFeatureId = feature.getId(); // Is undefined
      // var foundFeatureId = feature.id; // Is undefined
      // var foundFeatureGeo = feature.getGeometry().get(); // Not a function
      console.log(foundFeatureId);
      google.maps.event.trigger(map,'click',feature); // seems to do nothing
    }
  });
  </code></pre>
  
  <p>On search of a character ("g","o","l", for instance), the search finds a match and then tries to trigger the click event of that geoJSON polygon (ultimately, so the infowindow is opened). </p>
  
  <p>This is the part that's stumping me. I've tried defining the ID, but it's undefined using <code>getId()</code>. Can't seem to directly trigger it either when iterating over the Data layer. Can't seem to find it when trying to look into <code>maps.data</code> either.</p>
  
  <p>How do I properly trigger this event using the geoJSON layer only?</p>