Como puedo controlar que solo se muestre un openInfoWindow??

60 views
Skip to first unread message

Joel Rodriguez

unread,
Jun 13, 2013, 10:23:54 AM6/13/13
to gmaps4...@googlegroups.com
Buenos dias, tengo un problema con la visibilidad del openInfoWindows, la tarea es hacer que se muestre con un evento mouseover y un evento click también que solo se abra una sola ventana, mis marcadores se generan con una lista, mi código es el siguiente:

(Utilizo la version 3 de gMaps y gmaps4jsf version 3.0.0)

 <script>
               unction marker1ClickHandler() {
                            // jsVariable="map1"
                          map1.closeInfoWindow();
                    }
 </script>

<ice:form id="formMap" >
                    <ice:panelGroup rendered="#{reporteBean.idPozo == 0}">
                        <m:map jsVariable="map1"
                               width="100%" height="800px" zoom="11" 
                               enableScrollWheelZoom="true" 
                               latitude="24.7555601" longitude="-98.0064475" 
                               locationNotFoundErrorMessage="Esta parte del mapa no esta disponible, por favor regrese un nivel de zoom">                            
                            <c:forEach var="coor" items="#{reporteBean.pozosList}" >                                 
                                <m:marker latitude="#{coor['latitudSup']}" 
                                          longitude="#{coor['longitudSup']}" 
                                          showInformationEvent="mouseover"                                             
                                          >                                    
                                    <m:eventListener eventName="click"  jsFunction="marker1ClickHandler"/>                                       
                                    <m:htmlInformationWindow  htmlText="#{coor['evento']}" >                                                                                    
                                    </m:htmlInformationWindow>
                                </m:marker>                    
                            </c:forEach>
                        </m:map>


Por favor si alguien soluciono este problema, pido su ayuda..todo es bueno--


Saludos.

Hazem Saleh

unread,
Jun 13, 2013, 11:54:53 AM6/13/13
to gmaps4jsf-dev, Jose Noheda
@Jose: can you please support Joel as I do not understand Spanish. Thank you.


2013/6/13 Joel Rodriguez <velocirr...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "gmaps4jsf-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmaps4jsf-de...@googlegroups.com.
To post to this group, send email to gmaps4...@googlegroups.com.
Visit this group at http://groups.google.com/group/gmaps4jsf-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Hazem Ahmed Saleh Ahmed

Author of JavaScript Unit Testing book:
http://www.amazon.com/dp/1782160620/

Co-author of (The Definitive Guide to Apache MyFaces and Facelets) book:
http://www.amazon.com/-/e/B002M052KY

DeveloperWorks Contributing Author
https://www.ibm.com/developerworks/mydeveloperworks/blogs/hazem/entry/ibm_developerworks_contributing_author?lang=en_us

An Apache committer, IBMer, and a technical speaker

Twitter: http://www.twitter.com/hazems

Joel Rodriguez

unread,
Jun 13, 2013, 2:51:33 PM6/13/13
to gmaps4...@googlegroups.com


Good morning, I have a problem with the visibility of openInfoWindows, the task is to make it show a mouseover event and a click event also that only one window open, my bookmarks are generated with a list, my code is as follows:

(I use version 3 of GMaps and gmaps4jsf version 3.0.0

 <script>
               unction marker1ClickHandler() {
                            // jsVariable="map1"
                          map1.closeInfoWindow();
                    }
 </script>

<ice:form id="formMap" >
                    <ice:panelGroup rendered="#{reporteBean.idPozo == 0}">
                        <m:map jsVariable="map1"
                               width="100%" height="800px" zoom="11" 
                               enableScrollWheelZoom="true" 
                               latitude="24.7555601" longitude="-98.0064475" 
                               locationNotFoundErrorMessage="Esta parte del mapa no esta disponible, por favor regrese un nivel de zoom">                            
                            <c:forEach var="coor" items="#{reporteBean.pozosList}" >                                 
                                <m:marker latitude="#{coor['latitudSup']}" 
                                          longitude="#{coor['longitudSup']}" 
                                          showInformationEvent="mouseover"                                             
                                          >                                    
                                    <m:eventListener eventName="click"  jsFunction="marker1ClickHandler"/>                                       
                                    <m:htmlInformationWindow  htmlText="#{coor['evento']}" >                                                                                    
                                    </m:htmlInformationWindow>
                                </m:marker>                    
                            </c:forEach>
                        </m:map>

Please someone fix this problem, I ask your help .. all good 




Joel Rodriguez

unread,
Jun 13, 2013, 6:29:30 PM6/13/13
to gmaps4...@googlegroups.com
Good morning, I have a problem with the visibility of openInfoWindows, the task is to make it show a mouseover event and a click event also that only one window open, my bookmarks are generated with a list, my code is as follows:

(I use version 3 of GMaps and gmaps4jsf version 3.0.0)
 

 <script>
               unction marker1ClickHandler() {
                            // jsVariable="map1"
                          map1.closeInfoWindow();
                    }
 </script>

<ice:form id="formMap" >
                    <ice:panelGroup rendered="#{reporteBean.idPozo == 0}">
                        <m:map jsVariable="map1"
                               width="100%" height="800px" zoom="11" 
                               enableScrollWheelZoom="true" 
                               latitude="24.7555601" longitude="-98.0064475" 
                               locationNotFoundErrorMessage="Esta parte del mapa no esta disponible, por favor regrese un nivel de zoom">                            
                            <c:forEach var="coor" items="#{reporteBean.pozosList}" >                                 
                                <m:marker latitude="#{coor['latitudSup']}" 
                                          longitude="#{coor['longitudSup']}" 
                                          showInformationEvent="mouseover"                                             
                                          >                                    
                                    <m:eventListener eventName="click"  jsFunction="marker1ClickHandler"/>                                       
                                    <m:htmlInformationWindow  htmlText="#{coor['evento']}" >                                                                                    
                                    </m:htmlInformationWindow>
                                </m:marker>                    
                            </c:forEach>
                        </m:map>


Please someone fix this problem, I ask your help .. all good -


Greetings. 

Jose Castrillón

unread,
Sep 2, 2013, 4:51:10 PM9/2/13
to gmaps4...@googlegroups.com
Joel, yo tengo el mismo problema que se me quedan abiertas todas las ventanas de información y en el anterior api se cerraban automáticamente he buscado por todo lado y no se como solucionarlo, me gustaría saber si usted logro solucionarlo y como lo hizo. 


Muchas gracias. 

Hazem Saleh

unread,
Sep 2, 2013, 6:36:49 PM9/2/13
to gmaps4jsf-dev
@Jose Noheda: please support Jose as I donot know Spanish.


--
You received this message because you are subscribed to the Google Groups "gmaps4jsf-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmaps4jsf-de...@googlegroups.com.
To post to this group, send email to gmaps4...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Hazem Saleh
Reply all
Reply to author
Forward
0 new messages