Problem fitting gmap to tabView's size

UI Components for JSF
Post Reply
sebd
Posts: 1
Joined: 08 Dec 2011, 02:09

08 Dec 2011, 02:34

Hi, some days ago I put a gmap inside a layoutUnit, setting its height and width to 100%, and everything worked as expected: the map filled the whole layoutUnit.

Code: Select all

<p:layoutUnit position="center">
    <p:gmap id="mapa" center="-37.0000, -60.0000" zoom="6" 
        type="roadmap" streetView="false" 
        style="width:100%;height:100%;" widgetVar="tmap" />
</p:layoutUnit>
Now I needed to put the map inside a tab (and to make the tabView fill the layoutUnit) like this:

Code: Select all

<p:layoutUnit position="center">
				<p:tabView>
					<p:tab title="Mapa">
						<p:gmap id="mapa" center="-37.0000, -60.0000" zoom="6" 
							type="roadmap" streetView="false" 
							style="width:100%;height:100%;" widgetVar="tmap" />
					</p:tab>
					<p:tab title="Listado">
					</p:tab>
				</p:tabView>
</p:layoutUnit>
The problem is the map isn't filling its container anymore, so nothing is actually shown inside the tab. When I specify the map's size in pixels it works, but I need it to always fill its container (even when the window is resized).

I think it has to do with a <ul> and a <li> wrapping the map's div, but I couldn't fix it.

I'm using PrimeFaces-3.0.M4, Tomcat 6.0.33 and JSF Mojarra.

Any help will be greatly appreciated, thanks!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: ajvillafuerte and 31 guests