title: CodeIgniter Gmaps get marker object lat long
body: <p>I'm using the Google Maps CI library by <a href="http://biostall.com/codeigniter-google-maps-v3-api-library" rel="nofollow">biostall</a>. I want to panTo the marker that has been clicked so the map is centered on that marker.</p>
  
  <p>I've tried this JS but it seems that the marker object doesn't have the getLatLng() method.</p>
  
  <pre><code>function open_marker(id){
      google.maps.event.trigger(markers[id],'click'); // this works fine, opens the correct marker
      map.panTo(markers[id].getLatLng());
      return;
  }
  </code></pre>
  
  <p>Getting the error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object #V> has no method 'getLatLng'</p>
  </blockquote>
  
  <p>I need to get a marker object that I can getLatLng().</p>
  
  <p>When I <code>alert(markers[id])</code> it says object, so I'm assuming it exists.</p>