erickgugo / gmaps4jsf

Automatically exported from code.google.com/p/gmaps4jsf
0 stars 0 forks source link

Mouse over/mouse out hanleding events for popups in google map #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a requiement ,when i will put the mouse over then popup message has to 
display if mouse out then popu need to hide.
Please find the code and suggese the same .
<m:map width="width:100%;" height="421px" jsVariable="gmap"     
latitude="#{shipmentTrack.mapLatitude}"
longitude="#shipmentTrack.mapLongitude}"
renderOnWindowLoad="#{shipmentTrack.renderOnWindowLoad}">

<m:mapControl name="GLargeMapControl" position="G_ANCHOR_TOP_LEFT" />
<m:mapControl name="GMapTypeControl" position="G_ANCHOR_TOP_RIGHT" />
 <a4j:repeat id="detail" value="#{shipmentTrack.deviceTrack}"
   var="device">
   <m:marker latitude="#{device.latitude}" renderOnWindowLoad="false"   longitude="#{device.longitude}" showInformationEvent="mouseover">
         <m:icon  imageURL="#{device.iconPath}" />
        <m:popup icon="shop" content="#{device.message}" 
backgroundColor="FF00FF" textColor="FF0000" />
    <m:eventListener eventName="mouserover" jsFunction="mouserOver"/>                           
                        </m:marker>
    <m:eventListener eventName="mouserout" jsFunction="mouserOut"/>                         
                        </m:marker>

    </a4j:repeat>
</map>
<script>
            function mouserOver() {

             gmap.closeInfoWindow();    

            }
            function mouserOut() {

             gmap.closeInfoWindow();    

            }

            </script>

Original issue reported on code.google.com by kadiay...@gmail.com on 14 Jul 2010 at 10:48

GoogleCodeExporter commented 9 years ago
 I don't really understand the requirement. The code sample is too confusing. Please trim it as much as possible (1 marker, no controls...) and rephrase the need. mouserover and mouserout are not valid events by the way.

Original comment by jose.noh...@gmail.com on 25 Jul 2010 at 5:46

GoogleCodeExporter commented 9 years ago

Original comment by Hazem.sa...@gmail.com on 2 Dec 2010 at 11:27

GoogleCodeExporter commented 9 years ago

Original comment by Hazem.sa...@gmail.com on 14 Mar 2013 at 12:24