$(document).on 'click', '#sideBar li', ->
markers[$(this).data('marker')].panTo()
google.maps.event.trigger(markers[$(this).data('marker')], 'click')
Seems silly. All answers point to this working perfectly. My map pans to the appropriate marker, but I can't seem to get the 'click' action to happen to open the infowindow. I'm using the new v2 of the gmaps4rails gem, which is where the .panTo()
comes from.
Since it pans just fine, I'm inclined to believe that my markers[$(this).data('marker')]
marker call is fine.