Tuesday, December 13, 2011

[Google Maps API v2] Re: Having trouble placing map in sidebar of my layout

Thanks, switching to fixed dimensions for the map fixed it!

On Dec 13, 2:43 pm, Andrew Leach <andrew.leac...@gmail.com> wrote:
> On Dec 13, 1:04 pm, Fledder <ferdy.christ...@gmail.com> wrote:
>
> > I did figure out that if
> > I set the height of ALL parent elements to 100% it does render in the
> > sidebar.
>
> That's correct. The browser needs to know what it's 100% of. If an
> element in the hierarchy doesn't have a size (either fixed or
> percentage) then it all becomes rather indeterminate.
>
> > The problem is, I cannot do that, as it breaks all kinds of
> > things in my layout. Why can't I just render the map as a block in the
> > sidebar without having to change the entire layout rules of the site?
>
> You can set the div to a fixed size. But if the sidebar is variable
> width (say) then you need to be able to determine the width all the
> way up the hierarchy to where it can be determined with certainty.
>
> You don't necessarily have to go all the way to <html> if you can fix
> the dimensions lower in the hierarchy.

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate