You could  try putting in an "onOpenFn" call back (one of the options)
to your map.openInfoWindow(...) and in that call back do a
map.updateInfoWindow(). That will resize it no matter what the
content.

I use map.updateInfoWindow() when I change from thumb nails to large
pictures in my infoWindow when the user clicks on the thumbnail.  But
I use the <img onload=".." ...</img>, not the call back.

Too bad about not knowing the content size (I've been there). Of
course you (and I) really do know the size, but probably like yourself
there are too many possibilities to keep track of.  So I just add
lines of stuff when I build the infoWindow on the fly depending on the
particulars of the point.

But knowing the size ahead of time would undoubtedly solve things.
You could put an artificially lard <div> size in just to see if it
works.  Not useful on a real map, I know.

I ended up calculating the aspect ration of each image and then kept
the width fixed and the height calculated on the fly using the aspect
ratio. It was not too bad so far with limited number of points.  To go
live, I'll have to automate that process or else standardize my photos
sizes. Hard when you have hundreds of photos of legacy data sitting
around.

You might do something like that if you just ran your data for you
points through a perl script and counted line feeds. Then save that
line feed number with the data for each point.

Otherwise you may have to just fool with the CSS.  (I guess you've
looked at that. Sorry.)

I have Firefox 3.5.4 and don't see the problem.


On Nov 10, 2:21 pm, Chris Schneider <[email protected]> wrote:
> Thanks for the suggestion, but I don't think my problem is a timing
> issue. Closing the window and reopening it does not resolve the
> problem. It would be difficult to size the window myself, because the
> content varies quite a bit.
>
> On Nov 10, 7:56 am, Papa Bear <[email protected]> wrote:
>
> > I had similar problems loading images into the infoWindow.  The
> > pctiure would show up after the infoWindow was sized and overflow.
>
> > You may be a victim of the speed of the newer version.  Namely, the
> > browser is throwing up the infoWindow before the content is completely
> > loaded.  Is the content being pulled from a database with a latency?
>
> > My fix was twofold:
> > 1) size the <div> containing the content at the start. If your content
> > is fixed, you could store the number of lines of expected text, along
> > with the content.
> > 2) resizing the infoWindow after the image is loaded (using the
> > onload="..." parameter for the image).  Not sure you can do that for
> > text.
>
> > I still occasionally see the problem.  When I do I notice it,
> > reloading the infoWindow (clicking on the icon again) fixes it, which
> > implies the second time around every thing was in the cache.  Not
> > good, and I still plan to play around with it.  As with most problems,
> > IE shows it the worst..
>
> > On Nov 10, 12:57 am, Chris Schneider <[email protected]> wrote:
>
> > > Gang,
>
> > > I noticed that after upgrading to Firefox 3.5.5, text sometimes leaks
> > > out the bottom of my info balloons. The problem appears to be related
> > > to text wrapping (i.e., unexpected wrapping increases the height of
> > > the content after the window height is set, or something like that.)
> > > Try clicking on the red marker on the following page after loading it
> > > into a window just wide enough to avoid the horizontal scroll bar:
>
> > >http://www.vulgarianramblers.org/peak_detail.php?peak_name=Abbot&show...
>
> > > On Firefox 3.5.5, the last line of text ("SPS list classification...")
> > > appears just below the info balloon. On Firefox 2.0 (and in Safari &
> > > Camino) everything fits within the info balloon. I'm not exactly sure
> > > when Firefox started behaving differently, but my friend tried the
> > > above with Firefox 3.5.4, and it had the same problem as 3.5.5. It
> > > does seem to happen more often in 3.5.5, though.
>
> > > Note that the info balloon for Mt. Morgan (3 miles ENE of Mt. Abbot)
> > > appears fine in Firefox 3.5.5, probably because neither the Official
> > > summit elevation nor the SummitPost.org page got wrapped.
>
> > > Finally, I'm aware of the text zooming problem, and I've got my text
> > > un-zoomed.
>
> > > Anyone else seeing this behavior?
>
> > > - Schmed
>
> > > Details on my Firefox 3.5.5 test system:
>
> > > Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5)
> > > Gecko/20091102 Firefox/3.5.
> > > Mac OS X 10.5.8.

--

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=.


Reply via email to