title: Google Maps API v3 & fusion layers: get row data
body: <p>I'm trying to get a row id from a fusion table layer in google maps using geometry when a marker is placed on the map.  This is my first attempt at using fusion layers and despite reading the docs and spending hours testing I'm now stumped.</p>
  
  <p>If a user clicks on the map I can get the row["id"] no problem but if I programmatically place the marker using any other method (e.g. autocomplete.getPlace) I can't get the row id from the FusionLayer which is all I need.  My code is below:</p>
  
  <pre><code>/* get row id if user clicks on the map */
  google.maps.event.addListener(fusionLayer, "click", function(e) {
      document.getElementById("MY_HIDDEN_FIELD").value = e.row["id"].value;
      placeMarker(e.latLng, map);
  });
  
  function placeMarker(position, map) {
      addMarker(map,true,position);
      map.panTo(position);
      document.getElementById("latitude").value = position.lat();
      document.getElementById("longitude").value = position.lng();
  }
  
  function addMarker(map,draggable,position){
      deleteMarkers();
      if (infowindow) {
          infowindow.close();
      }
      draggable = typeof draggable !== "undefined" ? draggable : true;
      var icon = document.getElementById("map-icon").value;
      var marker = new google.maps.Marker({
          map: map,
          draggable: true,
          position: position,
          icon: icon
      });
      arr_markers.push(marker);
  }
  </code></pre>
  
  <p>I've been messing about for hours trying to work this out.  I've tried placing listeners on the fusionLayer on bounds_changed and center_changed as below but that doesn't work because e is not defined:</p>
  
  <pre><code>google.maps.event.addListener(fusionLayer, "center_changed", function(e) {
      document.getElementById("MY_HIDDEN_FIELD").value = e.row["id"].value;
      placeMarker(e.latLng, map);
  });
  </code></pre>
  
  <p>Can anyone help point me in the right direction?</p>
  
  <p>Many thanks</p>