I have a map with a fair number of markers, each with a bit of
information that gets displayed in the infoWindow.  The markers
represent boundary monuments on the US - Canadian border.  Here's the
map:

http://members.bellatlantic.net/~vze2h6gy/papabear/BM_Station_GMap.html#&FILE=NH_Boundary.js&index=boundary&title=1&t=terr

Some of the markers (about 20 out of the total of several hundred)
also display a thumb nail photo.  These are the ones I have actually
visited,

The map is generated client-side and it's all vanilla java script.
The data is in a separate .js file and consists of several arrays of
objects.  Although I am still tinkering with the code, functionally it
basically works, (although like many others it was written and
debugged using Firefox, so I haven't checked every last little feature
under IE).

The problem: all the verbal content comes from the server where my map
comes from, so it is generally all resident on the client's PC once
the thing gets loaded.  The photos, however, come from another server
and they are generally only pulled down when the info Window is
created.  They are specified using html <img ...> tags.  Most times
things work fine, but a noticeable fraction of the time the text will
appear and the infoWindow will be brought up before the photo
arrives.  When it does arrive, it gets put where it belongs, but more
often than not, it will go outside the bounds of the infoWindow.

I have a general idea how large the thumbnails with be, but a goodly
number have an odd aspect ratio which I can't predict in advance, so I
can't just pre allocate the right
amount of space in the <div ...> that holds the <img ...>.

I can do an updateInfoWindow(), and that indeed works, but I don't
know when to do it.  If I wait say 250 msec and call it, it may be too
soon or too late.  And when I do it too far out, I get an annoying
flicker.

Any suggestions?  Any one know a way to tell when the photo gets
loaded?  Is there some Dom event for that?  How do fancy professional
sites handle this sort of thing?

If you want to see the affect, try clicking on the markers with these
names of the map:
Hereford
Beecher Tablet
Hill Tablet
Metallak
Pros (which is hiding behind Spect)
the unlabeled marker on the upper right end of the border
the unlabeled marker on the lower left end of the border
the unlabeled marker at the upper left, where the green markers start.

I you have fast service to my photo server, maybe you won't see the
problem.  For me it's about 50 / 50.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to