Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Images don't fit in InfoWindow -- possible solution?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam Schneider  
View profile  
 More options Nov 13 2010, 3:13 am
From: Adam Schneider <adam-g...@unpossible.com>
Date: Sat, 13 Nov 2010 00:13:30 -0800 (PST)
Local: Sat, Nov 13 2010 3:13 am
Subject: Images don't fit in InfoWindow -- possible solution?
Today I was frustrated (again) by the fact that when you pop open an
info window (using a marker's openInfoWindowHtml function), and the
HTML contains <img> tags, the images often do not fit inside the
"bubble"; they stick out on the left and/or bottom.  The problem, of
course, is that the API doesn't know how big the content will be until
after the images load.  The second time you open an info window, it
looks fine, because the images have been cached.

One solution to this problem is to add height and width attributes to
the IMG tag.  Unfortunately, sometimes that's not possible.  For
example, today I was trying to load in a KML file that came from
picasa.com; there were images in all the placemarks' descriptions, but
no height and width specified, and no way to add them automatically.

Another solution I've seen proposed is to pre-load the content of all
the markers in an invisible or off-screen DIV.  But that's a bad idea
if there's 100 markers and people might only click one or two.

.

I was thinking about it today, and I think I found a good compromise:
pre-load the info window content out of sight, but only for one marker
at a time, and only when you mouseover that marker!  It works because
any time you're going to click on a marker, you're going to move your
mouse over it first.

I've been trying it with maps on GPSVisualizer.com, and it seems to
work well.  The only pitfall is that if you move your mouse over
dozens of markers, they'll all load.  But it's certainly better than
pre-loading EVERY marker on the map.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Esa  
View profile  
 More options Nov 15 2010, 3:53 am
From: Esa <esa.ilm...@gmail.com>
Date: Mon, 15 Nov 2010 00:53:17 -0800 (PST)
Local: Mon, Nov 15 2010 3:53 am
Subject: Re: Images don't fit in InfoWindow -- possible solution?
I agree.

I tried similar solution with iframes in info window. There is no size
problem with an iframe but still preloading makes much better user
experience.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »