I have a list of polylines, just like google maps does when I click on the polyline I want an infowindow to show up just where I clicked, and it works just fine with this fu
Might be a bit old as well, but why not add the infobox on the click?
infowindow.setPosition(event.latLng); infowindow.open(this.getMap());
If it's a click that is.