Fitting route and infowindow into viewport

21 views
Skip to first unread message

MymsMan

unread,
Aug 25, 2011, 11:45:03 AM8/25/11
to google-map...@googlegroups.com
I want to optimize the display of a route and an infowindow but am not sure how best to go about it.

If I fitBounds for my route first the opening of the infowindow can cause part of the route to be shifted off the map while if I open the infowindow before fitBounds the window can shift off the screen.

Is there any easy way to 'reserve' a bit of space above the route to minimize the chance that  the map will need to move?

I could add a dummy spot to the bounds but I don't think I can easily calculate where the top of the infowindow would appear to be located on the map.

Any ideas?
Reply all
Reply to author
Forward
0 new messages