You want to know the width and height after content has been added,
correct? Use element.offsetHeight and element.offsetWidth:
https://developer.mozilla.org/En/DOM/Element.offsetHeight
https://developer.mozilla.org/En/DOM/Element.offsetWidth

Positioning an infowindow should be a matter of creating the DOM
element containing whatever content, calling offsetHeight, and
offsetting the element by that height.

On Dec 10, 12:15 am, "d.bun" <[email protected]> wrote:
> So i've gone and made a custom infowindow using a table, each cell
> containing a part of the image of the infowindow, tiling to fit
> content.  It works quite nicely, however the yoffset that position the
> tip of the infowindow above the marker,  shoots up or down if the size
> of the content changes - such as with bold tags or a change in font or
> font size.  I've been able to do a guess and check on the table
> height, with the default font size- but it's only fixed on that one
> font size.  A couple of solutions I've thought of was to strictly use
> one font and size, without any bold tags - or other font size changing
> tags; or to log the various calculations of the font sizes I would use
> + tags.
>
> What would make it easiest is to somehow come up with the height of
> the table in pixels, after the infowindow is created with content.  Or
> restrict it to an area centered above the marker.
>
> I guess I'm interested to know how the default infowindow is created -
> perhaps a link to the source - and any diy solutions other people have
> come up with for custom infowindows.
>
> Thank you all! - Dan

--

You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.


Reply via email to