Increase Info Window Maximum Height

1,433 views
Skip to first unread message

David Karger

unread,
Oct 18, 2011, 9:42:50 PM10/18/11
to google-map...@googlegroups.com
I just spent a couple of hours tracking down an InfoWindow bug that turned out to be a v3 "feature".  InfoWindows size to fit around their contents.  But they refuse to set heights larger than the containing map.  Instead, if your content is too large, it run outside the bottom of the infoWindow bubble.    I would much rather have the infoWindow be larger than the containing map.  But I can't find any way to tell the api to do that.  Is there one?

Pil

unread,
Oct 19, 2011, 4:15:42 AM10/19/11
to Google Maps JavaScript API v3
You really don't have control over the info window size. The API
calculates the size of the info window depending on the map size and
the size of the browser window.

I think thats part of a long-term strategy: To take away control from
the users and developers as much as possible.

So if you want to control the info window size you'd have to fool the
API - a very time-consuming task.

Joseph Elfelt

unread,
Oct 19, 2011, 8:09:02 AM10/19/11
to Google Maps JavaScript API v3
Can you post a link to your map?
Are you using KML files?

Would an infowindow with a scroll bar suffice? That way the text will
not blow past the bottom of the bubble.
Adjust your browser window so it only fills ~1/2 the height of your
screen, then click the marker on the following map. You should see an
infowindow with a vertical scroll bar.

http://code.google.com/apis/maps/documentation/javascript/examples/infowindow-simple.html

Luke Mahé

unread,
Oct 19, 2011, 6:41:52 PM10/19/11
to google-map...@googlegroups.com
I think thats part of a long-term strategy: To take away control from
the users and developers as much as possible.

This is incorrect Pil. Most developers just want the InfoWindow to open and fit in the map but still have the controls still visible around it and that is the use case that we aim to solve by default. If the developer wants full control they are more than welcome to not use the InfoWindow and instead create a custom overlay that does everything they need.

If you have specific bugs then please file them on the issue tracker with demos that show the problem.

Thanks

-- Luke


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply all
Reply to author
Forward
0 new messages