1

I am using gmaps4jsf jar file for getting dynamic marker on google map but once i click on submit button then getting whole data on web page, evem map also with dynamic marker but map marker is coming after refresh the page.

jsf code:

<m:map id="map" width="650px" height="450px" latitude="#{map.latitude}" longitude="#{map.longitude}" enableScrollWheelZoom="true" zoom="9">                   
    <m:marker latitude="#{point.latitude}" longitude="#{point.longitude}" >
       <m:htmlInformationWindow htmlText="Click me!" />
    </m:marker>                    
</m:map>

<p:column>
  <p:commandButton value="Display" action="#{map.display}" update="form"/>
</p:column>

jsf component is refreshing fine only problem with google map..

1 Answers1

0

You should use partiallyTriggered="true" for refresh the google map. as you said you are using gmaps4jsf jar so it will help and i'm updating your code so you can find here

<m:map id="map" partiallyTriggered="true" width="650px" height="450px" latitude="#{map.latitude}" longitude="#{map.longitude}" enableScrollWheelZoom="true" zoom="9">                   
    <m:marker latitude="#{point.latitude}" longitude="#{point.longitude}" >
       <m:htmlInformationWindow htmlText="Click me!" />
    </m:marker>                    
</m:map>
Piyush Gupta
  • 2,181
  • 3
  • 13
  • 28