Gmap Info Window height

UI Components for JSF
Post Reply
falex
Posts: 25
Joined: 06 May 2010, 13:08

17 Jun 2010, 16:48

It seams that the height of the google map info window is almost never large enough to accommodate the displayed content, and a vertical scrollbar is displayed. I am currently displaying three types of components that produce the vertical scrollbar: p:carousel, p:datatable and p:panel.
Can you please tell me if there is a quick work-around until this will be fixed?

Example of code for which the vertical scrollbar is shown inside the p:gmapInfoWindow

Code: Select all

                   <p:gmap type="ROADMAP" center="#{sensorsPage.mapCenter}" zoom="#{sensorsPage.mapZoom}"
                            model="#{sensorsPage.sensorMapModel}" overlaySelectListener="#{sensorsPage.onMarkerSelect}"
                            widgetVar="sensorMap" style="width:100%;height:800px">

                        <p:gmapInfoWindow id="sensorInfoWindow">
                            <p:outputPanel id="locationDetail" rendered="#{sensorsPage.selectedLocation != null}">
                                <h:panelGrid columns="2">
                                    <strong>Description</strong>
                                    <h:outputText value="#{sensorsPage.selectedLocation.description}"/>

                                    <strong>Address</strong>
                                    <h:outputText value="#{sensorsPage.selectedLocation.address}"/>
                                </h:panelGrid>

                                <h:outputText value="No sensors have been added to this location"
                                              rendered="#{empty sensorsPage.selectedLocation.sensorList}"/>
                                <p:dataTable var="sensor" value="#{sensorsPage.selectedLocation.sensorList}"
                                        rendered="#{not empty sensorsPage.selectedLocation.sensorList}">
                                    <p:column>
                                        <f:facet name="header">
                                            <h:outputText value="Name"/>
                                        </f:facet>
                                        <h:outputText value="#{sensor.name}"/>
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">
                                            <h:outputText value="Description"/>
                                        </f:facet>
                                        <h:outputText value="#{sensor.description}"/>
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">
                                            <h:outputText value="Type"/>
                                        </f:facet>
                                        <h:outputText value="#{sensor.type.name}"/>
                                    </p:column>
                                    <p:column>
                                        <f:facet name="header">
                                            <h:outputText value="Actions"/>
                                        </f:facet>
                                        <h:commandLink id="showMeasurementsClassic"
                                                       action="#{sensorsPage.selectSensor}"
                                                       actionListener="#{sensorsPage.selectSensorListener}">
                                            <f:ajax execute="@this" render=":sensors:sensorMeasurementsPanel"
                                                    onevent="processAjax"/>
                                            <f:setPropertyActionListener value="#{sensor}" target="#{sensorsPage.selectedSensor}"/>
                                            <h:graphicImage url="/resources/images/16x16/hourglass.png" styleClass="middle"/>
                                            <h:outputText value="Past measurements"/>
                                        </h:commandLink>
                                    </p:column>
                                </p:dataTable>
                            </p:outputPanel>
                        </p:gmapInfoWindow>
                    </p:gmap>

falex
Posts: 25
Joined: 06 May 2010, 13:08

22 Jun 2010, 17:08

It seams that the issue has been solved in version 2.1.RC1-SNAPSHOT. Good work!

falex
Posts: 25
Joined: 06 May 2010, 13:08

22 Jun 2010, 18:02

Actually, the problem is still there and it seams to be related to the fact that I have a p:tabView inside the p:gmapInfoWindow. Can there be added a height attribute on the p:gmapInfoWindow? Or does anyone know a way to resize the p:gmapInfoWindow, after the p:tabView is changed?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Jun 2010, 12:16

This is more related to google maps api, you might try google maps forum to find out how to specify dimensions for info window.

falex
Posts: 25
Joined: 06 May 2010, 13:08

02 Jul 2010, 11:15

It seams that specifying a dimension for the p:outpuptPanel that is included in the p:gmapInfoWindow ensures that that info window is visible, but I would have liked for the automatic sizing to work.

This is the code, if someone else has the same issue.

Code: Select all

<p:gmapInfoWindow id="infoWindow">
    <p:outputPanel id="infoWindowPanel" style="display:block;height:270px;width:420px">

thepocholo
Posts: 3
Joined: 06 Mar 2011, 00:14

07 Mar 2011, 00:28

Hi falex im trying to use de infowindows but de OVerlaySelectEvent return null, how do you fix that????

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests