Again: About the size of infowindows

857 views
Skip to first unread message

Pil

unread,
Dec 4, 2011, 9:46:17 AM12/4/11
to Google Maps JavaScript API v3
You will laugh but to determine the size of an infowindow is one of
the most difficult things when developing a real complex site that
uses a database to store user data, fetches user requested xml feeds
and a few more of these advanced features.

The guys at the maps API team wanted to have control over the
infowindow size, so they implemented an algorithm that adjusts the
infowindow size dependant on the size of the browser window - bummer.
Don't ask me why because I cannot tell you the reason. I also cannot
tell you how this algorithm looks like and which values for the width
and the height it determines, because they refuse to make it public,
i.e. these values are their secret.

So to determine the proper size of infowindows is always like playing
roulette against this unknown algorithm: I'd have to open and close
the infowindows constantly, just as constantly I must resize the
browser window at different monitor resolutions.

And all this just to finally find out some values for the infowindow
size that fit (never exactly, only in some degrees) in different
brower window sizes.

I'm familiar with this maps stuff now for a few years and already made
infowindows for the v2 maps API - always without any problem.

Sorry to say that, but this looks like pure chicanery - paternalism.
They just wanted to take the control over the infowindow size out of
particular preferences - and they have done it ...

Chris Broadfoot

unread,
Dec 4, 2011, 7:57:50 PM12/4/11
to google-map...@googlegroups.com
Hi Pil,

Response inline.

On Mon, Dec 5, 2011 at 1:46 AM, Pil <wol...@gmail.com> wrote:
<snip>
 
The guys at the maps API team wanted to have control over the
infowindow size, so they implemented an algorithm that adjusts the
infowindow size dependant on the size of the browser window - bummer.
Don't ask me why because I cannot tell you the reason. I also cannot
tell you how this algorithm looks like and which values for the width
and the height it determines, because they refuse to make it public,
i.e. these values are their secret.

Info window size is determined based on two factors:
- the size of the content
- the size of the map (not the browser)

The reason for not making this available is for a pretty simple reason: we may change it one day, and if you prepare you map to the characteristics of a particular behaviour, chances are it'll break.

Once we document a particular behaviour, we can't really change it for the above reason. This prevents us making improvements and changes to the API. Thus, we leave it ambiguous and try to make the best decision we can.

In fact, we made a recent change that improved sizing of info windows, where the size is calculated inside the map to account for any CSS the developer may have added.

There's no malicious conspiracy to make things hidden from the developer!
 
So to determine the proper size of infowindows is always like playing
roulette against this unknown algorithm: I'd have to open and close
the infowindows constantly, just as constantly I must resize the
browser window at different monitor resolutions.

I'm not sure what different monitor resolutions has to do with anything. If you've seen different behaviour according to this, please do file a bug with a *reproducible* test case.
 
<snip>
 
Sorry to say that, but this looks like pure chicanery - paternalism.
They just wanted to take the control over the infowindow size out of
particular preferences - and they have done it ...

Those are bold claims - I've said it before, but please refrain from making such statements without some solid evidence. Hint: you won't find any - we strive to do the best by our users and developers.

Also, I'll cut in before one of the forum experts: could you please show a reproducible test case of your problems? A test page goes much further to us fixing troublesome behaviour than accusatory statements.

--

Hugh H.

unread,
Dec 28, 2011, 5:31:11 AM12/28/11
to Google Maps JavaScript API v3
On Dec 5, 1:57 am, Chris Broadfoot <c...@google.com> wrote:
> ... <snip>
>
> Info window size is determined based on two factors:
> - the size of the content
> - the size of the map (not the browser)
>
> > <snip>
>

Hi Chris:

We have a map working fine in every browser tested on Mac & PC
(Safari, FF, Chrome, IE8) but IE9 on W7, where the InfoWindow width is
not enough causing the text wrapping and scroll bar appears. You can
see an example here, marker 1 (below 13):

http://www.lojopez.es/fashion/shopping-city-guide/kuala-lumpur/

Thanks in advance
Reply all
Reply to author
Forward
0 new messages