Google maps v3 info window opening outside map viewport

user1294249 picture user1294249 · Mar 27, 2012 · Viewed 7.2k times · Source

If a marker is clicked near the top of the map viewport, the infowindow loads outside the viewable area and the map must be dragged to see infowindow content.

Ideally I don't want the map to auto pan. Is there a way to load the infowindow in a different direction, e.g. if the marker is at the top of the viewport to display the infowindow in a downward direction.

Answer

edigu picture edigu · Mar 27, 2012

No, you can't open google's default infowindows in a different direction since you don't implement your own infowindow class. But you can disable auto-pannnig simply passing TRUE to disableAutoPan property of InfoWindowOptions object like documentation said.