I've got the problem that I want to update my gmap after a onStateChange with new markers if the lat&long has changed. I have a map where I want to show thousends of markers, for optimization I only want to show and add the markers to the MapModel which are actually viewable (depending on latitude & longitude).
Problem is that the following code creates an endless loop because on init the stateChange event is fired and it tries to update the map again and so on.
Code: Select all
<p:gmap id="map" center="36.890257,30.707417" zoom="13" type="HYBRID" model="#{mapBean.model}" style="width:600px;height:400px">
<p:ajax event="stateChange" listener="#{mapBean.onStateChange}" update="map"/>
</p:gmap>
I use actually Primeface 3.0.M3, JSF2.1
Kind regards,
Adrian