The only reasonable solution that I could find is to re-open the info window when the contents change. I think that's what maps.google.com does, but their code is somewhat difficult to read. maps.google.com may be doing something complicated with jstcache and transclude Attributes to speed up or smooth the transition, I can't seem to find any documentation on what those Attributes do.
The API certainly doesn't recalculate the size of the info window graphics when the size of the contents change. I don't think that would be possible. One problem is that the browser doesn't fire a "contents have changed size" event, so the only way to detect the fact that the contents had changed size would be to continuously re-calculate the content size and compare it with the old value. I could never get my head around GInfoWindow.reset(). Note that if you want to try using GInfoWindow.reset(), the API won't calculate the size of the new graphics, you have to tell it the new GSize that you want. [The documentation for GInfoWindow.reset() is misleading. When it says "Each argument may be null and then its value will not be changed from the current value" it really should say "Each OPTIONAL argument may be null and then its value will not be changed from the current value". And anyway, you DO want to change the size]. The API will not automatically calculate the size for you, but will enforce the minimum size if you try to set it smaller. That's fine if you're doing something like displaying a simple <img> where you know the size beforehand, but it gets somewhat tricky in the general case if you're adding text which might possibly be displayed slightly differently in different browsers, or, in the worst case, be line wrapped differently in different browsers. I suspect that GInfoWindow.reset() might possibly produce a smoother transition, because with a straight re-opening of the info window the order of events might be: 1. close old info window 2. create off-screen divs containing the contents of each tab 3. wait for the browser to render them 4. ask the browser for their sizes 5. create the graphics 6. display the new info window but if you use GInfoWindow.reset() you must perform the equivalent of steps 2, 3 and 4 before the old infowindow gets closed. -- http://econym.org.uk/gmap The Blackpool Community Church Javascript Team --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
